X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Ftodesbaum%2Fjsite%2Fmain%2FMain.java;h=8a4f905318535e7e8e9ba1aa0fde7b6ce994ee55;hb=f5865ae6b7b1f0149cd642683584404119568a66;hp=1c6e8de19dfbf2c49c88314c0bf3c3cc36a9ef82;hpb=09151c7de967b7ce409fc10e08e5bd3448eb80dc;p=jSite.git diff --git a/src/main/java/de/todesbaum/jsite/main/Main.java b/src/main/java/de/todesbaum/jsite/main/Main.java index 1c6e8de..8a4f905 100644 --- a/src/main/java/de/todesbaum/jsite/main/Main.java +++ b/src/main/java/de/todesbaum/jsite/main/Main.java @@ -80,7 +80,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, 10); + private static final Version VERSION = new Version(0, 11, 1); /** The configuration. */ private Configuration configuration; @@ -122,7 +122,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 }; + private static final Locale[] SUPPORTED_LOCALES = new Locale[] { Locale.ENGLISH, Locale.GERMAN, Locale.FRENCH, new Locale("pl") }; /** The actions that switch the language. */ private Map languageActions = new HashMap(); @@ -341,6 +341,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen projectPage.setName("page.project"); projectPage.setProjects(configuration.getProjects()); projectPage.setFreenetInterface(freenetInterface); + projectPage.setWebOfTrustInterface(webOfTrustInterface); projectPage.addListSelectionListener(this); pages.put(PageType.PAGE_PROJECTS, projectPage); @@ -500,6 +501,15 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen } } + /** + * Quits jSite, stopping all background services. + */ + private void quit() { + updateChecker.stop(); + webOfTrustInterface.stop(); + System.exit(0); + } + // // INTERFACE ListSelectionListener // @@ -627,21 +637,21 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen int overwriteConfigurationAnswer = JOptionPane.showConfirmDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.quit.overwrite-configuration"), configuration.getConfigurationLocator().getFile(configuration.getConfigurationDirectory())), I18n.getMessage("jsite.quit.overwrite-configuration.title"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (overwriteConfigurationAnswer == JOptionPane.YES_OPTION) { if (saveConfiguration()) { - System.exit(0); + quit(); } } else if (overwriteConfigurationAnswer == JOptionPane.CANCEL_OPTION) { return; } if (overwriteConfigurationAnswer == JOptionPane.NO_OPTION) { - System.exit(0); + quit(); } } else { if (saveConfiguration()) { - System.exit(0); + quit(); } } if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.quit.config-not-saved"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.OK_OPTION) { - System.exit(0); + quit(); } } }