first commit
This commit is contained in:
parent
5a21a820b3
commit
6b4b4c0ac4
@ -71,7 +71,6 @@ 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,
|
||||||
@ -662,12 +661,33 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
saveHistory();
|
saveHistory();
|
||||||
});
|
});
|
||||||
historyButtonClear.addActionListener(event -> {
|
historyButtonClear.addActionListener(event -> {
|
||||||
Utils.clearURLHistory();
|
JPanel checkChoise = new JPanel();
|
||||||
HISTORY.clear();
|
checkChoise.setLayout(new FlowLayout());
|
||||||
try {
|
JButton yesButton = new JButton("YES");
|
||||||
historyTableModel.fireTableDataChanged();
|
JButton noButton = new JButton("NO");
|
||||||
} catch (Exception e) { }
|
yesButton.setPreferredSize(new Dimension(70,30));
|
||||||
saveHistory();
|
noButton.setPreferredSize(new Dimension(70,30));
|
||||||
|
checkChoise.add(yesButton);
|
||||||
|
checkChoise.add(noButton);
|
||||||
|
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||||
|
JFrame frame = new JFrame("Are you sure?");
|
||||||
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
frame.add(checkChoise);
|
||||||
|
frame.setSize(405, 70);
|
||||||
|
frame.setVisible(true);
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
|
noButton.addActionListener(e -> {
|
||||||
|
frame.setVisible(false);
|
||||||
|
});
|
||||||
|
yesButton.addActionListener(ed -> {
|
||||||
|
frame.setVisible(false);
|
||||||
|
Utils.clearURLHistory();
|
||||||
|
HISTORY.clear();
|
||||||
|
try {
|
||||||
|
historyTableModel.fireTableDataChanged();
|
||||||
|
} catch (Exception e) { }
|
||||||
|
saveHistory();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Re-rip all history
|
// Re-rip all history
|
||||||
@ -1278,3 +1298,4 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user