mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-01-17 20:58:31 +01:00
simplify main window variable assignments
This commit is contained in:
parent
78af90a25b
commit
ea097ad669
@ -847,9 +847,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
frame.setSize(405, 70);
|
frame.setSize(405, 70);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
frame.setLocationRelativeTo(null);
|
frame.setLocationRelativeTo(null);
|
||||||
noButton.addActionListener(e -> {
|
noButton.addActionListener(e -> frame.setVisible(false));
|
||||||
frame.setVisible(false);
|
|
||||||
});
|
|
||||||
yesButton.addActionListener(ed -> {
|
yesButton.addActionListener(ed -> {
|
||||||
frame.setVisible(false);
|
frame.setVisible(false);
|
||||||
Utils.clearURLHistory();
|
Utils.clearURLHistory();
|
||||||
@ -898,7 +896,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
t.start();
|
t.start();
|
||||||
});
|
});
|
||||||
configLogLevelCombobox.addActionListener(arg0 -> {
|
configLogLevelCombobox.addActionListener(arg0 -> {
|
||||||
String level = ((JComboBox) arg0.getSource()).getSelectedItem().toString();
|
String level = ((JComboBox<?>) arg0.getSource()).getSelectedItem().toString();
|
||||||
setLogLevel(level);
|
setLogLevel(level);
|
||||||
});
|
});
|
||||||
configSelectLangComboBox.addActionListener(arg0 -> {
|
configSelectLangComboBox.addActionListener(arg0 -> {
|
||||||
@ -909,7 +907,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
configSaveDirLabel.addMouseListener(new MouseAdapter() {
|
configSaveDirLabel.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
Path file = null;
|
Path file;
|
||||||
try {
|
try {
|
||||||
file = Utils.getWorkingDirectory();
|
file = Utils.getWorkingDirectory();
|
||||||
Desktop desktop = Desktop.getDesktop();
|
Desktop desktop = Desktop.getDesktop();
|
||||||
@ -1239,7 +1237,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
private void ripNextAlbum() {
|
private void ripNextAlbum() {
|
||||||
isRipping = true;
|
isRipping = true;
|
||||||
// Save current state of queue to configuration.
|
// Save current state of queue to configuration.
|
||||||
Utils.setConfigList("queue", (Enumeration<Object>) queueListModel.elements());
|
Utils.setConfigList("queue", queueListModel.elements());
|
||||||
|
|
||||||
if (queueListModel.isEmpty()) {
|
if (queueListModel.isEmpty()) {
|
||||||
// End of queue
|
// End of queue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user