From 3c159939118aa11f812ef35ea6063ab636597c0e Mon Sep 17 00:00:00 2001 From: Artyom Yurkov <32659793+Varinara@users.noreply.github.com> Date: Thu, 7 Dec 2017 20:00:18 +0300 Subject: [PATCH] Update MainWindow.java --- .../com/rarchives/ripme/ui/MainWindow.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ui/MainWindow.java b/src/main/java/com/rarchives/ripme/ui/MainWindow.java index 021c90b5..016d25f3 100644 --- a/src/main/java/com/rarchives/ripme/ui/MainWindow.java +++ b/src/main/java/com/rarchives/ripme/ui/MainWindow.java @@ -661,16 +661,6 @@ public final class MainWindow implements Runnable, RipStatusHandler { } catch (Exception e) { } saveHistory(); }); - historyButtonClear.addActionListener(event -> { - Utils.clearURLHistory(); - HISTORY.clear(); - try { - historyTableModel.fireTableDataChanged(); - } catch (Exception e) { } - saveHistory(); - }); - - // Re-rip all history historyButtonClear.addActionListener(event -> { if (Utils.getConfigBoolean("history.warn_before_delete", true)) { @@ -713,6 +703,16 @@ public final class MainWindow implements Runnable, RipStatusHandler { 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; for (HistoryEntry entry : HISTORY.toList()) { if (entry.selected) {