[izpack-changes] r1688 - in izpack-src/trunk: . src/lib/com/izforge/izpack/installer src/lib/com/izforge/izpack/panels

noreply at berlios.de noreply at berlios.de
Sun Jan 7 18:16:12 CET 2007


Author: jponge
Date: 2007-01-07 18:16:08 +0100 (Sun, 07 Jan 2007)
New Revision: 1688

Modified:
   izpack-src/trunk/Versions.txt
   izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java
   izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java
Log:
PathInputPanel: the close button had incorrect behavior for all path input question/notification messages (Vladimir Ralev, JBoss/RedHat, via Julien Ponge)

Modified: izpack-src/trunk/Versions.txt
===================================================================
--- izpack-src/trunk/Versions.txt	2007-01-07 17:11:02 UTC (rev 1687)
+++ izpack-src/trunk/Versions.txt	2007-01-07 17:16:08 UTC (rev 1688)
@@ -40,6 +40,8 @@
 - Finnish localization updates (Ari Voutilainen via Julien Ponge)
 - Going back and forth between profile selection and packs selection made packs selection unavailable
   (Vladimir Ralev, JBoss/RedHat, via Julien Ponge)  
+- PathInputPanel: the close button had incorrect behavior for all path input question/notification messages
+  (Vladimir Ralev, JBoss/RedHat, via Julien Ponge)
 
   > 3.9.0 (build 2006.09.25)
 - Fix NullPointerException in CompilerConfig, if you specify a 

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java	2007-01-07 17:11:02 UTC (rev 1687)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java	2007-01-07 17:16:08 UTC (rev 1688)
@@ -390,6 +390,8 @@
      * @see AbstractUIHandler#askQuestion(String, String, int, int)
      */
     public int askQuestion(String title, String question, int choices, int default_choice)
+
+        if (user_choice == JOptionPane.CLOSED_OPTION) return AbstractUIHandler.ANSWER_NO;
     {
         int jo_choices = 0;
 
@@ -405,6 +407,11 @@
 
         if (user_choice == JOptionPane.YES_OPTION) return AbstractUIHandler.ANSWER_YES;
 
+    public boolean emitNotificationFeedback(String message)
+    {
+       return (JOptionPane.showConfirmDialog(this, message, "Message", JOptionPane.WARNING_MESSAGE,
+             JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION);
+    }
         if (user_choice == JOptionPane.NO_OPTION) return AbstractUIHandler.ANSWER_NO;
 
         return default_choice;

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java	2007-01-07 17:11:02 UTC (rev 1687)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java	2007-01-07 17:16:08 UTC (rev 1688)
@@ -189,8 +189,11 @@
                 ok = res == AbstractUIHandler.ANSWER_YES;
             }
             else
-                this.emitNotification(getI18nStringForClass("createdir", "TargetPanel") + "\n"
-                        + chosenPath);
+            {
+			    ok = this.emitNotificationFeedback(getI18nStringForClass("createdir", "TargetPanel") + "\n"
+			            + chosenPath);
+			
+			}
         }
         return ok;
     }




More information about the izpack-changes mailing list