mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-20 20:51:28 +02:00
Update MainWindow.java
This commit is contained in:
@@ -661,12 +661,14 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
saveHistory();
|
saveHistory();
|
||||||
});
|
});
|
||||||
historyButtonClear.addActionListener(event -> {
|
historyButtonClear.addActionListener(event -> {
|
||||||
|
if (Utils.getConfigBoolean("history.warn_before_delete", true)) {
|
||||||
|
|
||||||
JPanel checkChoise = new JPanel();
|
JPanel checkChoise = new JPanel();
|
||||||
checkChoise.setLayout(new FlowLayout());
|
checkChoise.setLayout(new FlowLayout());
|
||||||
JButton yesButton = new JButton("YES");
|
JButton yesButton = new JButton("YES");
|
||||||
JButton noButton = new JButton("NO");
|
JButton noButton = new JButton("NO");
|
||||||
yesButton.setPreferredSize(new Dimension(70,30));
|
yesButton.setPreferredSize(new Dimension(70, 30));
|
||||||
noButton.setPreferredSize(new Dimension(70,30));
|
noButton.setPreferredSize(new Dimension(70, 30));
|
||||||
checkChoise.add(yesButton);
|
checkChoise.add(yesButton);
|
||||||
checkChoise.add(noButton);
|
checkChoise.add(noButton);
|
||||||
JFrame.setDefaultLookAndFeelDecorated(true);
|
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||||
@@ -685,9 +687,20 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
HISTORY.clear();
|
HISTORY.clear();
|
||||||
try {
|
try {
|
||||||
historyTableModel.fireTableDataChanged();
|
historyTableModel.fireTableDataChanged();
|
||||||
} catch (Exception e) { }
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
saveHistory();
|
saveHistory();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Utils.clearURLHistory();
|
||||||
|
HISTORY.clear();
|
||||||
|
try {
|
||||||
|
historyTableModel.fireTableDataChanged();
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
saveHistory();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Re-rip all history
|
// Re-rip all history
|
||||||
|
Reference in New Issue
Block a user