1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 17:28:51 -05:00

* make Match button "Smart" again so it'll suggest fetching data if names is list empty... i guess people have been doing it wrong too long to change that now...

This commit is contained in:
Reinhard Pointner 2013-11-13 01:44:07 +00:00
parent b2b29b2584
commit e2e4ee240e
2 changed files with 17 additions and 1 deletions

View File

@ -40,11 +40,15 @@ class MatchAction extends AbstractAction {
} }
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
if (model.names().isEmpty() || model.files().isEmpty()) { if (model.files().isEmpty()) {
UILogger.info("Nothing to match. Please add some files and fetch data first."); UILogger.info("Nothing to match. Please add some files and fetch data first.");
return; return;
} }
if (model.names().isEmpty()) {
return;
}
BackgroundMatcher backgroundMatcher = new BackgroundMatcher(model, EpisodeMetrics.defaultSequence(true)); BackgroundMatcher backgroundMatcher = new BackgroundMatcher(model, EpisodeMetrics.defaultSequence(true));
backgroundMatcher.execute(); backgroundMatcher.execute();

View File

@ -12,6 +12,7 @@ import java.awt.Cursor;
import java.awt.Desktop; import java.awt.Desktop;
import java.awt.Insets; import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
@ -204,6 +205,17 @@ public class RenamePanel extends JComponent {
filesList.getButtonPanel().add(createImageButton(clearFilesAction), "gap 0"); filesList.getButtonPanel().add(createImageButton(clearFilesAction), "gap 0");
filesList.getButtonPanel().add(createImageButton(openHistoryAction), "gap indent"); filesList.getButtonPanel().add(createImageButton(openHistoryAction), "gap indent");
matchButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// show popup on actionPerformed only when names list is empty
if (renameModel.files().size() > 0 && renameModel.names().isEmpty()) {
fetchPopupAction.actionPerformed(e);
}
}
});
// reveal file location on double click // reveal file location on double click
filesList.getListComponent().addMouseListener(new MouseAdapter() { filesList.getListComponent().addMouseListener(new MouseAdapter() {