From f387228497c1c990377b9dc9fda2f5eb89c6e3a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 22 Mar 2012 19:36:29 +0100 Subject: [PATCH] Add combo box for manifest putter. --- src/de/todesbaum/jsite/gui/PreferencesPage.java | 30 +++++++++++++++++++++++++ src/de/todesbaum/jsite/i18n/jSite.properties | 1 + src/de/todesbaum/jsite/i18n/jSite_de.properties | 1 + src/de/todesbaum/jsite/i18n/jSite_fr.properties | 1 + 4 files changed, 33 insertions(+) diff --git a/src/de/todesbaum/jsite/gui/PreferencesPage.java b/src/de/todesbaum/jsite/gui/PreferencesPage.java index 66ab6ab..7baf14d 100644 --- a/src/de/todesbaum/jsite/gui/PreferencesPage.java +++ b/src/de/todesbaum/jsite/gui/PreferencesPage.java @@ -40,6 +40,7 @@ import javax.swing.JTextField; import de.todesbaum.jsite.i18n.I18n; import de.todesbaum.jsite.i18n.I18nContainer; import de.todesbaum.jsite.main.ConfigurationLocator.ConfigurationLocation; +import de.todesbaum.util.freenet.fcp2.ClientPutDir.ManifestPutter; import de.todesbaum.util.freenet.fcp2.PriorityClass; import de.todesbaum.util.swing.TWizard; import de.todesbaum.util.swing.TWizardPage; @@ -111,6 +112,9 @@ public class PreferencesPage extends TWizardPage { /** The insert priority select box. */ private JComboBox insertPriorityComboBox; + /** The manifest putter select box. */ + private JComboBox manifestPutterComboBox; + /** * Creates a new “preferences” page. * @@ -261,6 +265,25 @@ public class PreferencesPage extends TWizardPage { } /** + * Returns the selected manifest putter. + * + * @return The selected manifest putter + */ + public ManifestPutter getManifestPutter() { + return (ManifestPutter) manifestPutterComboBox.getSelectedItem(); + } + + /** + * Sets the manifest putter. + * + * @param manifestPutter + * The manifest putter + */ + public void setManifestPutter(ManifestPutter manifestPutter) { + manifestPutterComboBox.setSelectedItem(manifestPutter); + } + + /** * {@inheritDoc} */ @Override @@ -433,6 +456,12 @@ public class PreferencesPage extends TWizardPage { insertPriorityComboBox.setAction(priorityAction); preferencesPanel.add(insertPriorityComboBox, new GridBagConstraints(1, 9, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.VERTICAL, new Insets(0, 18, 0, 0), 0, 0)); + final JLabel manifestPutterLabel = new JLabel(I18n.getMessage("jsite.preferences.insert-options.manifest-putter")); + preferencesPanel.add(manifestPutterLabel, new GridBagConstraints(0, 10, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0)); + + manifestPutterComboBox = new JComboBox(ManifestPutter.values()); + preferencesPanel.add(manifestPutterComboBox, new GridBagConstraints(1, 10, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 18, 0, 0), 0, 0)); + I18nContainer.getInstance().registerRunnable(new Runnable() { /** @@ -443,6 +472,7 @@ public class PreferencesPage extends TWizardPage { configurationDirectoryLabel.setText("" + I18n.getMessage("jsite.preferences.config-directory") + ""); insertOptionsLabel.setText("" + I18n.getMessage("jsite.preferences.insert-options") + ""); insertPriorityLabel.setText(I18n.getMessage("jsite.preferences.insert-options.priority")); + manifestPutterLabel.setText(I18n.getMessage("jsite.preferences.insert-options.manifest-putter")); } }); diff --git a/src/de/todesbaum/jsite/i18n/jSite.properties b/src/de/todesbaum/jsite/i18n/jSite.properties index e897179..9e93e5d 100644 --- a/src/de/todesbaum/jsite/i18n/jSite.properties +++ b/src/de/todesbaum/jsite/i18n/jSite.properties @@ -80,6 +80,7 @@ jsite.preferences.config-directory.custom=Custom directory jsite.preferences.insert-options=Insert options jsite.preferences.insert-options.use-early-encode=Generate final URI early jsite.preferences.insert-options.priority=Priority +jsite.preferences.insert-options.manifest-putter=Manifest Putter jsite.insert.heading=Project insert jsite.insert.description=Please wait while the project is being inserted. diff --git a/src/de/todesbaum/jsite/i18n/jSite_de.properties b/src/de/todesbaum/jsite/i18n/jSite_de.properties index 2fd1564..3bc76ee 100644 --- a/src/de/todesbaum/jsite/i18n/jSite_de.properties +++ b/src/de/todesbaum/jsite/i18n/jSite_de.properties @@ -80,6 +80,7 @@ jsite.preferences.config-directory.custom=Angegebenes Verzeichnis jsite.preferences.insert-options=Einf\u00fcgeoptionen jsite.preferences.insert-options.use-early-encode=Endg\u00fcltige URI fr\u00fcher berechnen jsite.preferences.insert-options.priority=Priorit\u00e4t +jsite.preferences.insert-options.manifest-putter=Manifest Putter jsite.insert.heading=Projekt einf\u00fcgen jsite.insert.description=Bitte warten Sie, w\u00e4hrend das Projekt eingef\u00fcgt wird. diff --git a/src/de/todesbaum/jsite/i18n/jSite_fr.properties b/src/de/todesbaum/jsite/i18n/jSite_fr.properties index 143ef16..1d37f97 100644 --- a/src/de/todesbaum/jsite/i18n/jSite_fr.properties +++ b/src/de/todesbaum/jsite/i18n/jSite_fr.properties @@ -80,6 +80,7 @@ jsite.preferences.config-directory.custom=Custom directory jsite.preferences.insert-options=Insert options jsite.preferences.insert-options.use-early-encode=Generate final URI early jsite.preferences.insert-options.priority=Priority +jsite.preferences.insert-options.manifest-putter=Manifest Putter jsite.insert.heading=Projet d'insertion jsite.insert.description=Veuillez attendre durant l'insertion du projet. -- 2.7.4