+ hide "Override Extension" feature because people seem to activate it by mistake and then complain file extensions are being overriden

This commit is contained in:
Reinhard Pointner 2012-05-31 11:47:30 +00:00
parent 6ba1626666
commit dd3f7e64b2
1 changed files with 23 additions and 28 deletions

View File

@ -73,7 +73,6 @@ public class RenamePanel extends JComponent {
protected final RenameAction renameAction = new RenameAction(renameModel);
private static final PreferencesEntry<String> persistentOverrideExtension = Settings.forPackage(RenamePanel.class).entry("rename.extension.override").defaultValue("false");
private static final PreferencesEntry<String> persistentEpisodeFormat = Settings.forPackage(RenamePanel.class).entry("rename.format.episode");
private static final PreferencesEntry<String> persistentMovieFormat = Settings.forPackage(RenamePanel.class).entry("rename.format.movie");
private static final PreferencesEntry<String> persistentPreferredLanguage = Settings.forPackage(RenamePanel.class).entry("rename.language").defaultValue("en");
@ -87,9 +86,6 @@ public class RenamePanel extends JComponent {
filesList.setTitle("Original Files");
filesList.setTransferablePolicy(new FilesListTransferablePolicy(renameModel.files()));
// restore state
renameModel.setPreserveExtension(!Boolean.parseBoolean(persistentOverrideExtension.getValue()));
// filename formatter
renameModel.useFormatter(File.class, new FileNameFormatter(renameModel.preserveExtension()));
@ -158,8 +154,8 @@ public class RenamePanel extends JComponent {
// create settings popup
final Action settingsPopupAction = new ShowPopupAction("Options", ResourceManager.getIcon("action.report"));
JButton settingsButton = createImageButton(settingsPopupAction);
settingsButton.setAction(openHistoryAction);
ActionPopup settingsPopup = createSettingsPopup();
settingsButton.setComponentPopupMenu(settingsPopup);
renameButton.setComponentPopupMenu(settingsPopup);
filesList.getButtonPanel().add(settingsButton, "gap 0");
@ -287,8 +283,13 @@ public class RenamePanel extends JComponent {
actionPopup.addSeparator();
actionPopup.addDescription(new JLabel("History:"));
actionPopup.add(openHistoryAction);
actionPopup.add(new AbstractAction("Open History", ResourceManager.getIcon("action.report")) {
return actionPopup;
}
protected final Action openHistoryAction = new AbstractAction("Open History", ResourceManager.getIcon("action.report")) {
@Override
public void actionPerformed(ActionEvent e) {
@ -306,9 +307,6 @@ public class RenamePanel extends JComponent {
HistorySpooler.getInstance().commit(dialog.getModel());
}
}
});
return actionPopup;
}
@ -348,9 +346,6 @@ public class RenamePanel extends JComponent {
// display changed state
filesList.repaint();
// save state
persistentOverrideExtension.setValue(Boolean.toString(activate));
}
}