mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-17 23:05:03 -05:00
Refactor
This commit is contained in:
parent
5bbc697a76
commit
3bd1655136
@ -18,8 +18,6 @@ import java.awt.datatransfer.Transferable;
|
|||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
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.PropertyChangeListener;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
@ -804,17 +802,12 @@ public class RenamePanel extends JComponent {
|
|||||||
|
|
||||||
public AutoCompleteAction(String name, Icon icon, AutoCompleteMatcher matcher) {
|
public AutoCompleteAction(String name, Icon icon, AutoCompleteMatcher matcher) {
|
||||||
super(name, icon);
|
super(name, icon);
|
||||||
|
|
||||||
this.matcher = matcher;
|
this.matcher = matcher;
|
||||||
|
|
||||||
// disable action while episode list matcher is working
|
// disable action while episode list matcher is working
|
||||||
namesList.addPropertyChangeListener(LOADING_PROPERTY, new PropertyChangeListener() {
|
namesList.addPropertyChangeListener(LOADING_PROPERTY, evt -> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
|
||||||
// disable action while loading is in progress
|
// disable action while loading is in progress
|
||||||
setEnabled(!(Boolean) evt.getNewValue());
|
setEnabled(!(Boolean) evt.getNewValue());
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -896,7 +889,6 @@ public class RenamePanel extends JComponent {
|
|||||||
|
|
||||||
// auto-match in progress
|
// auto-match in progress
|
||||||
namesList.firePropertyChange(LOADING_PROPERTY, false, true);
|
namesList.firePropertyChange(LOADING_PROPERTY, false, true);
|
||||||
|
|
||||||
worker.execute();
|
worker.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user