X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fgui%2FPreferencesPage.java;h=5cf258afcdbf56c004663af24972b22366435a10;hb=e08a363c18f332342c22db3ba52cf89764e10838;hp=66ab6abd1bfe76bf27ddde289a8c8dcce76d52b6;hpb=4f84b1633c3f3c9a8af2fa5e15b29fb1b728bb2e;p=jSite.git diff --git a/src/de/todesbaum/jsite/gui/PreferencesPage.java b/src/de/todesbaum/jsite/gui/PreferencesPage.java index 66ab6ab..5cf258a 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 @@ -431,7 +454,13 @@ public class PreferencesPage extends TWizardPage { insertPriorityComboBox = new JComboBox(new PriorityClass[] { PriorityClass.MINIMUM, PriorityClass.PREFETCH, PriorityClass.BULK, PriorityClass.UPDATABLE, PriorityClass.SEMI_INTERACTIVE, PriorityClass.INTERACTIVE, PriorityClass.MAXIMUM }); 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)); + preferencesPanel.add(insertPriorityComboBox, new GridBagConstraints(1, 9, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, 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")); } });