1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-17 12:48:24 +01:00

simplify main window variable assignments

This commit is contained in:
soloturn 2022-04-25 07:45:59 +02:00
parent 78af90a25b
commit ea097ad669

View File

@ -847,9 +847,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
frame.setSize(405, 70);
frame.setVisible(true);
frame.setLocationRelativeTo(null);
noButton.addActionListener(e -> {
frame.setVisible(false);
});
noButton.addActionListener(e -> frame.setVisible(false));
yesButton.addActionListener(ed -> {
frame.setVisible(false);
Utils.clearURLHistory();
@ -898,7 +896,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
t.start();
});
configLogLevelCombobox.addActionListener(arg0 -> {
String level = ((JComboBox) arg0.getSource()).getSelectedItem().toString();
String level = ((JComboBox<?>) arg0.getSource()).getSelectedItem().toString();
setLogLevel(level);
});
configSelectLangComboBox.addActionListener(arg0 -> {
@ -909,7 +907,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
configSaveDirLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
Path file = null;
Path file;
try {
file = Utils.getWorkingDirectory();
Desktop desktop = Desktop.getDesktop();
@ -1239,7 +1237,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
private void ripNextAlbum() {
isRipping = true;
// Save current state of queue to configuration.
Utils.setConfigList("queue", (Enumeration<Object>) queueListModel.elements());
Utils.setConfigList("queue", queueListModel.elements());
if (queueListModel.isEmpty()) {
// End of queue