Update MainWindow.java
This commit is contained in:
parent
981898dc2a
commit
9f87b0322d
@ -71,6 +71,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
private static final Logger logger = Logger.getLogger(MainWindow.class);
|
private static final Logger logger = Logger.getLogger(MainWindow.class);
|
||||||
|
|
||||||
private boolean isRipping = false; // Flag to indicate if we're ripping something
|
private boolean isRipping = false; // Flag to indicate if we're ripping something
|
||||||
|
|
||||||
private static JFrame mainFrame;
|
private static JFrame mainFrame;
|
||||||
private static JTextField ripTextfield;
|
private static JTextField ripTextfield;
|
||||||
private static JButton ripButton,
|
private static JButton ripButton,
|
||||||
@ -660,6 +661,16 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
} catch (Exception e) { }
|
} catch (Exception e) { }
|
||||||
saveHistory();
|
saveHistory();
|
||||||
});
|
});
|
||||||
|
historyButtonClear.addActionListener(event -> {
|
||||||
|
Utils.clearURLHistory();
|
||||||
|
HISTORY.clear();
|
||||||
|
try {
|
||||||
|
historyTableModel.fireTableDataChanged();
|
||||||
|
} catch (Exception e) { }
|
||||||
|
saveHistory();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Re-rip all history
|
||||||
historyButtonClear.addActionListener(event -> {
|
historyButtonClear.addActionListener(event -> {
|
||||||
if (Utils.getConfigBoolean("history.warn_before_delete", true)) {
|
if (Utils.getConfigBoolean("history.warn_before_delete", true)) {
|
||||||
|
|
||||||
@ -702,16 +713,6 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
saveHistory();
|
saveHistory();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Re-rip all history
|
|
||||||
historyButtonRerip.addActionListener(event -> {
|
|
||||||
if (HISTORY.isEmpty()) {
|
|
||||||
JOptionPane.showMessageDialog(null,
|
|
||||||
"There are no history entries to re-rip. Rip some albums first",
|
|
||||||
"RipMe Error",
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int added = 0;
|
int added = 0;
|
||||||
for (HistoryEntry entry : HISTORY.toList()) {
|
for (HistoryEntry entry : HISTORY.toList()) {
|
||||||
if (entry.selected) {
|
if (entry.selected) {
|
||||||
@ -1311,4 +1312,3 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user