mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-10 07:54:02 +02:00
main window, localize one variable, remove unused method
This commit is contained in:
@@ -85,7 +85,6 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
public static JButton optionQueue;
|
public static JButton optionQueue;
|
||||||
private static JPanel queuePanel;
|
private static JPanel queuePanel;
|
||||||
private static DefaultListModel<Object> queueListModel;
|
private static DefaultListModel<Object> queueListModel;
|
||||||
private static QueueMenuMouseListener queueMenuMouseListener;
|
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
private static JButton optionConfiguration;
|
private static JButton optionConfiguration;
|
||||||
@@ -472,6 +471,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
queueListModel = new DefaultListModel();
|
queueListModel = new DefaultListModel();
|
||||||
JList queueList = new JList(queueListModel);
|
JList queueList = new JList(queueListModel);
|
||||||
queueList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
queueList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||||
|
QueueMenuMouseListener queueMenuMouseListener;
|
||||||
queueList.addMouseListener(
|
queueList.addMouseListener(
|
||||||
queueMenuMouseListener = new QueueMenuMouseListener(d -> updateQueue(queueListModel)));
|
queueMenuMouseListener = new QueueMenuMouseListener(d -> updateQueue(queueListModel)));
|
||||||
JScrollPane queueListScroll = new JScrollPane(queueList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
|
JScrollPane queueListScroll = new JScrollPane(queueList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
|
||||||
@@ -902,7 +902,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
setLogLevel(level);
|
setLogLevel(level);
|
||||||
});
|
});
|
||||||
configSelectLangComboBox.addActionListener(arg0 -> {
|
configSelectLangComboBox.addActionListener(arg0 -> {
|
||||||
String level = ((JComboBox) arg0.getSource()).getSelectedItem().toString();
|
String level = ((JComboBox<?>) arg0.getSource()).getSelectedItem().toString();
|
||||||
Utils.setLanguage(level);
|
Utils.setLanguage(level);
|
||||||
changeLocale();
|
changeLocale();
|
||||||
});
|
});
|
||||||
@@ -1563,10 +1563,6 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
Utils.setConfigBoolean("window.position", true);
|
Utils.setConfigBoolean("window.position", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void disableWindowPositioning() {
|
|
||||||
Utils.setConfigBoolean("window.position", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean hasWindowPositionBug() {
|
private static boolean hasWindowPositionBug() {
|
||||||
String osName = System.getProperty("os.name");
|
String osName = System.getProperty("os.name");
|
||||||
// Java on Windows has a bug where if we try to manually set the position of the
|
// Java on Windows has a bug where if we try to manually set the position of the
|
||||||
|
Reference in New Issue
Block a user