From 4c633debb3066a7094f3141dd111dd529860541e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 23 Oct 2008 01:39:14 +0200 Subject: [PATCH] Offer option to start with existing lockfile. --- src/de/todesbaum/jsite/main/Main.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 2f538d0..8c9a15d 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -145,8 +145,11 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen Locale.setDefault(configuration.getLocale()); I18n.setLocale(configuration.getLocale()); if (!configuration.createLockFile()) { - JOptionPane.showMessageDialog(null, I18n.getMessage("jsite.main.already-running"), null, JOptionPane.ERROR_MESSAGE); - return; + int option = JOptionPane.showOptionDialog(null, I18n.getMessage("jsite.main.already-running"), "", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[] { I18n.getMessage("jsite.main.already-running.override"), I18n.getMessage("jsite.wizard.quit") }, I18n.getMessage("jsite.wizard.quit")); + if (option != 0) { + return; + } + configuration.removeLockfileOnExit(); } wizard = new TWizard(); createActions(); -- 2.7.4