Use better method to show the possible actions.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 28 Dec 2009 21:59:20 +0000 (22:59 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 28 Dec 2009 21:59:20 +0000 (22:59 +0100)
src/de/todesbaum/jsite/gui/ProjectInsertPage.java

index 984e6df..3b852a9 100644 (file)
@@ -321,8 +321,8 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
        public void projectInsertFinished(Project project, boolean success, Throwable cause) {
                if (success) {
                        String copyURILabel = I18n.getMessage("jsite.insert.okay-copy-uri");
-                       String selectedValue = (String) JOptionPane.showInputDialog(this, I18n.getMessage("jsite.insert.inserted"), I18n.getMessage("jsite.insert.done.title"), JOptionPane.INFORMATION_MESSAGE, null, new Object[] { I18n.getMessage("jsite.insert.okay"), copyURILabel }, copyURILabel);
-                       if (copyURILabel.equals(selectedValue)) {
+                       int selectedValue = JOptionPane.showOptionDialog(this, I18n.getMessage("jsite.insert.inserted"), I18n.getMessage("jsite.insert.done.title"), 0, JOptionPane.INFORMATION_MESSAGE, null, new Object[] { I18n.getMessage("jsite.insert.okay"), copyURILabel }, copyURILabel);
+                       if (selectedValue == 1) {
                                actionCopyURI();
                        }
                } else {