Set version to 0.9.2.
[jSite.git] / src / de / todesbaum / jsite / main / Main.java
index 84a9611..af921cf 100644 (file)
@@ -77,7 +77,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
        private static final Logger logger = Logger.getLogger(Main.class.getName());
 
        /** The version. */
-       private static final Version VERSION = new Version(0, 8);
+       private static final Version VERSION = new Version(0, 9, 2);
 
        /** The configuration. */
        private Configuration configuration;
@@ -209,6 +209,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                        @SuppressWarnings("synthetic-access")
                        public void actionPerformed(ActionEvent actionEvent) {
                                showPage(PageType.PAGE_NODE_MANAGER);
+                               optionsPreferencesAction.setEnabled(true);
                                wizard.setPreviousName(I18n.getMessage("jsite.wizard.previous"));
                                wizard.setNextName(I18n.getMessage("jsite.wizard.next"));
                        }
@@ -539,9 +540,14 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                        nodeMenu.setEnabled(false);
                        optionsPreferencesAction.setEnabled(false);
                } else if ("page.project.insert".equals(pageName)) {
-                       showPage(PageType.PAGE_PROJECTS);
-                       nodeMenu.setEnabled(true);
-                       optionsPreferencesAction.setEnabled(true);
+                       ProjectInsertPage projectInsertPage = (ProjectInsertPage) pages.get(PageType.PAGE_INSERT_PROJECT);
+                       if (projectInsertPage.isRunning()) {
+                               projectInsertPage.stopInsert();
+                       } else {
+                               showPage(PageType.PAGE_PROJECTS);
+                               nodeMenu.setEnabled(true);
+                               optionsPreferencesAction.setEnabled(true);
+                       }
                } else if ("page.preferences".equals(pageName)) {
                        showPage(PageType.PAGE_PROJECTS);
                        optionsPreferencesAction.setEnabled(true);
@@ -555,6 +561,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                String pageName = wizard.getPage().getName();
                if ("page.project".equals(pageName) || "page.preferences".equals(pageName)) {
                        showPage(PageType.PAGE_NODE_MANAGER);
+                       optionsPreferencesAction.setEnabled(true);
                } else if ("page.project.files".equals(pageName)) {
                        showPage(PageType.PAGE_PROJECTS);
                } else if ("page.project.insert".equals(pageName)) {