X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fmain%2FMain.java;h=af921cf2abdb9e400009ddb10204f3c9ee4f018c;hb=7cec7da468700fd0f1eb5677edf437902eeae04b;hp=cc540ea1320a9db41b8a0b5fe78e6947fdbd2bfa;hpb=b1c905d1a826b0fdd2947c58ace76d1347ede54a;p=jSite.git diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index cc540ea..af921cf 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -52,7 +52,7 @@ import de.todesbaum.jsite.application.ProjectInserter; import de.todesbaum.jsite.application.UpdateChecker; import de.todesbaum.jsite.application.UpdateListener; import de.todesbaum.jsite.application.ProjectInserter.CheckReport; -import de.todesbaum.jsite.application.ProjectInserter.CheckReport.Issue; +import de.todesbaum.jsite.application.ProjectInserter.Issue; import de.todesbaum.jsite.gui.NodeManagerListener; import de.todesbaum.jsite.gui.NodeManagerPage; import de.todesbaum.jsite.gui.PreferencesPage; @@ -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; @@ -116,7 +116,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen } /** The supported locales. */ - private static final Locale[] SUPPORTED_LOCALES = new Locale[] { Locale.ENGLISH, Locale.GERMAN, Locale.FRENCH, Locale.ITALIAN, new Locale("pl") }; + private static final Locale[] SUPPORTED_LOCALES = new Locale[] { Locale.ENGLISH, Locale.GERMAN, Locale.FRENCH }; /** The actions that switch the language. */ private Map languageActions = new HashMap(); @@ -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); @@ -553,8 +559,9 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen */ public void wizardPreviousPressed(TWizard wizard) { String pageName = wizard.getPage().getName(); - if ("page.project".equals(pageName)) { + 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)) {