Forward use-early-encode flag between configuration, preferences, and inserter.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 18 Mar 2012 00:35:00 +0000 (01:35 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 18 Mar 2012 00:35:00 +0000 (01:35 +0100)
src/de/todesbaum/jsite/main/Main.java

index ad61c5b..84be563 100644 (file)
@@ -458,6 +458,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).setConfigurationLocation(configuration.getConfigurationDirectory());
                ((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());
                showPage(PageType.PAGE_PREFERENCES);
                optionsPreferencesAction.setEnabled(false);
                wizard.setNextEnabled(true);
@@ -550,6 +551,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                        ProjectInsertPage projectInsertPage = (ProjectInsertPage) pages.get(PageType.PAGE_INSERT_PROJECT);
                        String tempDirectory = ((PreferencesPage) pages.get(PageType.PAGE_PREFERENCES)).getTempDirectory();
                        projectInsertPage.setTempDirectory(tempDirectory);
+                       projectInsertPage.setUseEarlyEncode(configuration.useEarlyEncode());
                        projectInsertPage.startInsert();
                        nodeMenu.setEnabled(false);
                        optionsPreferencesAction.setEnabled(false);
@@ -566,6 +568,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                        PreferencesPage preferencesPage = (PreferencesPage) pages.get(PageType.PAGE_PREFERENCES);
                        showPage(PageType.PAGE_PROJECTS);
                        optionsPreferencesAction.setEnabled(true);
+                       configuration.setUseEarlyEncode(preferencesPage.useEarlyEncode());
                        configuration.setConfigurationLocation(preferencesPage.getConfigurationLocation());
                }
        }