* more messages to help users know what to do next if they're just clicking around trying to figure out things work
This commit is contained in:
parent
a054f08946
commit
20aef4e385
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package net.sourceforge.filebot.ui.rename;
|
package net.sourceforge.filebot.ui.rename;
|
||||||
|
|
||||||
|
|
||||||
import static javax.swing.JOptionPane.*;
|
import static javax.swing.JOptionPane.*;
|
||||||
import static javax.swing.SwingUtilities.*;
|
import static javax.swing.SwingUtilities.*;
|
||||||
import static net.sourceforge.filebot.ui.NotificationLogging.*;
|
import static net.sourceforge.filebot.ui.NotificationLogging.*;
|
||||||
|
@ -71,7 +69,6 @@ import ca.odell.glazedlists.EventList;
|
||||||
import ca.odell.glazedlists.ListSelection;
|
import ca.odell.glazedlists.ListSelection;
|
||||||
import ca.odell.glazedlists.swing.EventSelectionModel;
|
import ca.odell.glazedlists.swing.EventSelectionModel;
|
||||||
|
|
||||||
|
|
||||||
public class RenamePanel extends JComponent {
|
public class RenamePanel extends JComponent {
|
||||||
|
|
||||||
protected final RenameModel renameModel = new RenameModel();
|
protected final RenameModel renameModel = new RenameModel();
|
||||||
|
@ -90,7 +87,6 @@ public class RenamePanel extends JComponent {
|
||||||
private static final PreferencesEntry<String> persistentPreferredLanguage = Settings.forPackage(RenamePanel.class).entry("rename.language").defaultValue("en");
|
private static final PreferencesEntry<String> persistentPreferredLanguage = Settings.forPackage(RenamePanel.class).entry("rename.language").defaultValue("en");
|
||||||
private static final PreferencesEntry<String> persistentPreferredEpisodeOrder = Settings.forPackage(RenamePanel.class).entry("rename.episode.order").defaultValue("Airdate");
|
private static final PreferencesEntry<String> persistentPreferredEpisodeOrder = Settings.forPackage(RenamePanel.class).entry("rename.episode.order").defaultValue("Airdate");
|
||||||
|
|
||||||
|
|
||||||
public RenamePanel() {
|
public RenamePanel() {
|
||||||
namesList.setTitle("New Names");
|
namesList.setTitle("New Names");
|
||||||
namesList.setTransferablePolicy(new NamesListTransferablePolicy(renameModel.values()));
|
namesList.setTransferablePolicy(new NamesListTransferablePolicy(renameModel.values()));
|
||||||
|
@ -176,7 +172,8 @@ public class RenamePanel extends JComponent {
|
||||||
ActionPopup fetchPopup = createFetchPopup();
|
ActionPopup fetchPopup = createFetchPopup();
|
||||||
|
|
||||||
final Action fetchPopupAction = new ShowPopupAction("Fetch", ResourceManager.getIcon("action.fetch"));
|
final Action fetchPopupAction = new ShowPopupAction("Fetch", ResourceManager.getIcon("action.fetch"));
|
||||||
JButton fetchButton = createImageButton(fetchPopupAction);
|
JButton fetchButton = new JButton(fetchPopupAction);
|
||||||
|
filesList.getListComponent().setComponentPopupMenu(fetchPopup);
|
||||||
namesList.getListComponent().setComponentPopupMenu(fetchPopup);
|
namesList.getListComponent().setComponentPopupMenu(fetchPopup);
|
||||||
fetchButton.setComponentPopupMenu(fetchPopup);
|
fetchButton.setComponentPopupMenu(fetchPopup);
|
||||||
matchButton.setComponentPopupMenu(fetchPopup);
|
matchButton.setComponentPopupMenu(fetchPopup);
|
||||||
|
@ -204,7 +201,7 @@ public class RenamePanel extends JComponent {
|
||||||
namesList.getButtonPanel().add(settingsButton, "gap indent");
|
namesList.getButtonPanel().add(settingsButton, "gap indent");
|
||||||
|
|
||||||
// open rename log button
|
// open rename log button
|
||||||
filesList.getButtonPanel().add(createImageButton(clearFilesAction), "gap 0");
|
filesList.getButtonPanel().add(new JButton(clearFilesAction), "gap 0");
|
||||||
filesList.getButtonPanel().add(createImageButton(openHistoryAction), "gap indent");
|
filesList.getButtonPanel().add(createImageButton(openHistoryAction), "gap indent");
|
||||||
|
|
||||||
// reveal file location on double click
|
// reveal file location on double click
|
||||||
|
@ -271,7 +268,6 @@ public class RenamePanel extends JComponent {
|
||||||
add(new LoadingOverlayPane(namesList, namesList, "32px", "30px"), "grow, sizegroupx list");
|
add(new LoadingOverlayPane(namesList, namesList, "32px", "30px"), "grow, sizegroupx list");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected ActionPopup createFetchPopup() {
|
protected ActionPopup createFetchPopup() {
|
||||||
final ActionPopup actionPopup = new ActionPopup("Series / Movie Data", ResourceManager.getIcon("action.fetch"));
|
final ActionPopup actionPopup = new ActionPopup("Series / Movie Data", ResourceManager.getIcon("action.fetch"));
|
||||||
|
|
||||||
|
@ -380,7 +376,6 @@ public class RenamePanel extends JComponent {
|
||||||
return actionPopup;
|
return actionPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected ActionPopup createSettingsPopup() {
|
protected ActionPopup createSettingsPopup() {
|
||||||
ActionPopup actionPopup = new ActionPopup("Rename Options", ResourceManager.getIcon("action.settings"));
|
ActionPopup actionPopup = new ActionPopup("Rename Options", ResourceManager.getIcon("action.settings"));
|
||||||
|
|
||||||
|
@ -398,7 +393,7 @@ public class RenamePanel extends JComponent {
|
||||||
return actionPopup;
|
return actionPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final Action clearFilesAction = new AbstractAction("Clear Files", ResourceManager.getIcon("action.clear")) {
|
protected final Action clearFilesAction = new AbstractAction("Clear", ResourceManager.getIcon("action.clear")) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
|
@ -429,14 +424,12 @@ public class RenamePanel extends JComponent {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
protected static class ShowPopupAction extends AbstractAction {
|
protected static class ShowPopupAction extends AbstractAction {
|
||||||
|
|
||||||
public ShowPopupAction(String name, Icon icon) {
|
public ShowPopupAction(String name, Icon icon) {
|
||||||
super(name, icon);
|
super(name, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
// display popup below component
|
// display popup below component
|
||||||
|
@ -445,18 +438,15 @@ public class RenamePanel extends JComponent {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
protected class SetRenameMode extends AbstractAction {
|
protected class SetRenameMode extends AbstractAction {
|
||||||
|
|
||||||
private final boolean activate;
|
private final boolean activate;
|
||||||
|
|
||||||
|
|
||||||
private SetRenameMode(boolean activate, String name, Icon icon) {
|
private SetRenameMode(boolean activate, String name, Icon icon) {
|
||||||
super(name, icon);
|
super(name, icon);
|
||||||
this.activate = activate;
|
this.activate = activate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
renameModel.setPreserveExtension(!activate);
|
renameModel.setPreserveExtension(!activate);
|
||||||
|
@ -469,18 +459,15 @@ public class RenamePanel extends JComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected class SetRenameAction extends AbstractAction {
|
protected class SetRenameAction extends AbstractAction {
|
||||||
|
|
||||||
private final StandardRenameAction action;
|
private final StandardRenameAction action;
|
||||||
|
|
||||||
|
|
||||||
public SetRenameAction(StandardRenameAction action, String name, Icon icon) {
|
public SetRenameAction(StandardRenameAction action, String name, Icon icon) {
|
||||||
super(name, icon);
|
super(name, icon);
|
||||||
this.action = action;
|
this.action = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
if (action == StandardRenameAction.MOVE) {
|
if (action == StandardRenameAction.MOVE) {
|
||||||
|
@ -493,12 +480,10 @@ public class RenamePanel extends JComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected class AutoCompleteAction extends AbstractAction {
|
protected class AutoCompleteAction extends AbstractAction {
|
||||||
|
|
||||||
private final AutoCompleteMatcher matcher;
|
private final AutoCompleteMatcher matcher;
|
||||||
|
|
||||||
|
|
||||||
public AutoCompleteAction(String name, Icon icon, AutoCompleteMatcher matcher) {
|
public AutoCompleteAction(String name, Icon icon, AutoCompleteMatcher matcher) {
|
||||||
super(name, icon);
|
super(name, icon);
|
||||||
|
|
||||||
|
@ -515,10 +500,10 @@ public class RenamePanel extends JComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent evt) {
|
public void actionPerformed(final ActionEvent evt) {
|
||||||
if (renameModel.files().isEmpty()) {
|
if (renameModel.files().isEmpty()) {
|
||||||
|
UILogger.info("Original Files is empty. Please add some files first.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,7 +517,6 @@ public class RenamePanel extends JComponent {
|
||||||
private final Locale locale = new Locale(persistentPreferredLanguage.getValue());
|
private final Locale locale = new Locale(persistentPreferredLanguage.getValue());
|
||||||
private final boolean autodetection = !isShiftOrAltDown(evt); // skip name auto-detection if SHIFT is pressed
|
private final boolean autodetection = !isShiftOrAltDown(evt); // skip name auto-detection if SHIFT is pressed
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Match<File, ?>> doInBackground() throws Exception {
|
protected List<Match<File, ?>> doInBackground() throws Exception {
|
||||||
List<Match<File, ?>> matches = matcher.match(remainingFiles, order, locale, autodetection, getWindow(RenamePanel.this));
|
List<Match<File, ?>> matches = matcher.match(remainingFiles, order, locale, autodetection, getWindow(RenamePanel.this));
|
||||||
|
@ -545,7 +529,6 @@ public class RenamePanel extends JComponent {
|
||||||
return matches;
|
return matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void done() {
|
protected void done() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1120,6 +1120,7 @@ iNSECTS
|
||||||
iNSOMNi
|
iNSOMNi
|
||||||
iNSPiRED
|
iNSPiRED
|
||||||
InSubs
|
InSubs
|
||||||
|
iNT-TD
|
||||||
IntelliQ
|
IntelliQ
|
||||||
iNTERNAL
|
iNTERNAL
|
||||||
iNTiMiD
|
iNTiMiD
|
||||||
|
@ -2366,6 +2367,7 @@ zomg
|
||||||
Zomg-Killerhurtalot
|
Zomg-Killerhurtalot
|
||||||
Zorori-Project
|
Zorori-Project
|
||||||
Zox
|
Zox
|
||||||
|
ZSiSO
|
||||||
Zurako
|
Zurako
|
||||||
Zuzuu
|
Zuzuu
|
||||||
ZZGtv
|
ZZGtv
|
||||||
|
|
|
@ -78,5 +78,10 @@
|
||||||
"user": "Raydan",
|
"user": "Raydan",
|
||||||
"date": "2013-09-08",
|
"date": "2013-09-08",
|
||||||
"text": "I can really recommend using filebot for sorting, moving, deleting, subtitle searching... I just started the script once... and it was quite mindblowing to be honest."
|
"text": "I can really recommend using filebot for sorting, moving, deleting, subtitle searching... I just started the script once... and it was quite mindblowing to be honest."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"user": "Nitish Kumar",
|
||||||
|
"date": "2013-09-21",
|
||||||
|
"text": "FileBot is such an amazing piece of work. Been using it for TV Shows renaming but today tried over movies as well. Big time success!"
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
Reference in New Issue