Forward priority between configuration, preferences, and project inserter. 0.10-rc1
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 18 Mar 2012 01:15:39 +0000 (02:15 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 18 Mar 2012 01:15:39 +0000 (02:15 +0100)
This resolves #261.

src/de/todesbaum/jsite/main/Main.java

index 84be563..455053e 100644 (file)
@@ -459,6 +459,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setHasNextToJarConfiguration(configuration.getConfigurationLocator().isValidLocation(ConfigurationLocation.NEXT_TO_JAR_FILE));
                ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setHasCustomConfiguration(configuration.getConfigurationLocator().isValidLocation(ConfigurationLocation.CUSTOM));
                ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setUseEarlyEncode(configuration.useEarlyEncode());
+               ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setPriority(configuration.getPriority());
                showPage(PageType.PAGE_PREFERENCES);
                optionsPreferencesAction.setEnabled(false);
                wizard.setNextEnabled(true);
@@ -552,6 +553,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                        String tempDirectory = ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).getTempDirectory();
                        projectInsertPage.setTempDirectory(tempDirectory);
                        projectInsertPage.setUseEarlyEncode(configuration.useEarlyEncode());
+                       projectInsertPage.setPriority(configuration.getPriority());
                        projectInsertPage.startInsert();
                        nodeMenu.setEnabled(false);
                        optionsPreferencesAction.setEnabled(false);
@@ -569,6 +571,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                        showPage(PageType.PAGE_PROJECTS);
                        optionsPreferencesAction.setEnabled(true);
                        configuration.setUseEarlyEncode(preferencesPage.useEarlyEncode());
+                       configuration.setPriority(preferencesPage.getPriority());
                        configuration.setConfigurationLocation(preferencesPage.getConfigurationLocation());
                }
        }