Now using RB for more UI elements
This commit is contained in:
parent
c4ce162b48
commit
dc9f7ea33e
@ -289,7 +289,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
gbc.gridx = 3; ripPanel.add(stopButton, gbc);
|
||||
gbc.weightx = 1;
|
||||
|
||||
statusLabel = new JLabel("Inactive");
|
||||
statusLabel = new JLabel(rb.getString("inactive"));
|
||||
statusLabel.setHorizontalAlignment(JLabel.CENTER);
|
||||
openButton = new JButton();
|
||||
openButton.setVisible(false);
|
||||
@ -402,9 +402,9 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
historyTable.getColumnModel().getColumn(i).setPreferredWidth(width);
|
||||
}
|
||||
JScrollPane historyTableScrollPane = new JScrollPane(historyTable);
|
||||
historyButtonRemove = new JButton("Remove");
|
||||
historyButtonClear = new JButton("Clear");
|
||||
historyButtonRerip = new JButton("Re-rip Checked");
|
||||
historyButtonRemove = new JButton(rb.getString("remove"));
|
||||
historyButtonClear = new JButton(rb.getString("clear"));
|
||||
historyButtonRerip = new JButton(rb.getString("re-rip.checked"));
|
||||
gbc.gridx = 0;
|
||||
// History List Panel
|
||||
JPanel historyTablePanel = new JPanel(new GridBagLayout());
|
||||
@ -459,9 +459,9 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
configurationPanel.setBorder(emptyBorder);
|
||||
configurationPanel.setVisible(false);
|
||||
// TODO Configuration components
|
||||
configUpdateButton = new JButton("Check for updates");
|
||||
configUpdateLabel = new JLabel("Current version: " + UpdateUtils.getThisJarVersion(), JLabel.RIGHT);
|
||||
JLabel configThreadsLabel = new JLabel("Maximum download threads:", JLabel.RIGHT);
|
||||
configUpdateButton = new JButton(rb.getString("check.for.updates"));
|
||||
configUpdateLabel = new JLabel( rb.getString("current.version") + ": " + UpdateUtils.getThisJarVersion(), JLabel.RIGHT);
|
||||
JLabel configThreadsLabel = new JLabel(rb.getString("max.download.threads") + ":", JLabel.RIGHT);
|
||||
JLabel configTimeoutLabel = new JLabel(rb.getString("timeout.mill"), JLabel.RIGHT);
|
||||
JLabel configRetriesLabel = new JLabel(rb.getString("retry.download.count"), JLabel.RIGHT);
|
||||
configThreadsText = new JTextField(Integer.toString(Utils.getConfigInteger("threads.size", 3)));
|
||||
@ -470,16 +470,16 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
configOverwriteCheckbox = addNewCheckbox(rb.getString("overwrite.existing.files"), "file.overwrite", false);
|
||||
configAutoupdateCheckbox = addNewCheckbox(rb.getString("auto.update"), "auto.update", true);
|
||||
configPlaySound = addNewCheckbox(rb.getString("sound.when.rip.completes"), "play.sound", false);
|
||||
configShowPopup = addNewCheckbox("Notification when rip starts", "download.show_popup", false);
|
||||
configShowPopup = addNewCheckbox(rb.getString("notification.when.rip.starts"), "download.show_popup", false);
|
||||
configSaveOrderCheckbox = addNewCheckbox(rb.getString("preserve.order"), "download.save_order", true);
|
||||
configSaveLogs = addNewCheckbox(rb.getString("save.logs"), "log.save", false);
|
||||
configSaveURLsOnly = addNewCheckbox("Save URLs only", "urls_only.save", false);
|
||||
configSaveAlbumTitles = addNewCheckbox("Save album titles", "album_titles.save", true);
|
||||
configClipboardAutorip = addNewCheckbox("Autorip from Clipboard", "clipboard.autorip", false);
|
||||
configSaveDescriptions = addNewCheckbox("Save descriptions", "descriptions.save", true);
|
||||
configPreferMp4 = addNewCheckbox("Prefer MP4 over GIF","prefer.mp4", false);
|
||||
configWindowPosition = addNewCheckbox("Restore window position", "window.position", true);
|
||||
configURLHistoryCheckbox = addNewCheckbox("Remember URL history", "remember.url_history", true);
|
||||
configSaveURLsOnly = addNewCheckbox(rb.getString("save.urls.only"), "urls_only.save", false);
|
||||
configSaveAlbumTitles = addNewCheckbox(rb.getString("save.album.titles"), "album_titles.save", true);
|
||||
configClipboardAutorip = addNewCheckbox(rb.getString("autorip.from.clipboard"), "clipboard.autorip", false);
|
||||
configSaveDescriptions = addNewCheckbox(rb.getString("save.descriptions"), "descriptions.save", true);
|
||||
configPreferMp4 = addNewCheckbox(rb.getString("prefer.mp4.over.gif"),"prefer.mp4", false);
|
||||
configWindowPosition = addNewCheckbox(rb.getString("restore.window.position"), "window.position", true);
|
||||
configURLHistoryCheckbox = addNewCheckbox(rb.getString("remember.url.history"), "remember.url_history", true);
|
||||
|
||||
configLogLevelCombobox = new JComboBox(new String[] {"Log level: Error", "Log level: Warn", "Log level: Info", "Log level: Debug"});
|
||||
configLogLevelCombobox.setSelectedItem(Utils.getConfigString("log.level", "Log level: Debug"));
|
||||
@ -966,7 +966,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
HISTORY.clear();
|
||||
if (historyFile.exists()) {
|
||||
try {
|
||||
logger.info("Loading history from " + historyFile.getCanonicalPath());
|
||||
logger.info(rb.getString("loading.history.from") + " " + historyFile.getCanonicalPath());
|
||||
HISTORY.fromFile(historyFile.getCanonicalPath());
|
||||
} catch (IOException e) {
|
||||
logger.error("Failed to load history from file " + historyFile, e);
|
||||
@ -979,7 +979,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
} else {
|
||||
logger.info("Loading history from configuration");
|
||||
logger.info(rb.getString("loading.history.from.configuration"));
|
||||
HISTORY.fromList(Utils.getConfigList("download.history"));
|
||||
if (HISTORY.toList().size() == 0) {
|
||||
// Loaded from config, still no entries.
|
||||
@ -1035,7 +1035,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException ie) {
|
||||
logger.error("Interrupted while waiting to rip next album", ie);
|
||||
logger.error(rb.getString("interrupted.while.waiting.to.rip.next.album"), ie);
|
||||
}
|
||||
ripNextAlbum();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user