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

noreply at berlios.de noreply at berlios.de
Fri Feb 16 09:39:14 CET 2007


Author: dreil
Date: 2007-02-16 09:39:11 +0100 (Fri, 16 Feb 2007)
New Revision: 1733

Modified:
   izpack-src/trunk/Versions.txt
   izpack-src/trunk/src/lib/com/izforge/izpack/installer/GUIInstaller.java
Log:
Fixed selection of default Language in LanguageDialog


Modified: izpack-src/trunk/Versions.txt
===================================================================
--- izpack-src/trunk/Versions.txt	2007-02-16 08:35:12 UTC (rev 1732)
+++ izpack-src/trunk/Versions.txt	2007-02-16 08:39:11 UTC (rev 1733)
@@ -3,6 +3,7 @@
   > Next release
 - Added ignore as possible value for failure argument in executables (Dennis Reil)
 - Added Conditional expressions (Dennis Reil)
+- Fixed selection of default language in LanguageSelectionDialog (Dennis Reil)
 
   > 3.10.0 (build 2007.01.29)
 

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/installer/GUIInstaller.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/installer/GUIInstaller.java	2007-02-16 08:35:12 UTC (rev 1732)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/installer/GUIInstaller.java	2007-02-16 08:39:11 UTC (rev 1733)
@@ -120,6 +120,7 @@
 
         // Loads the suitable langpack
         SwingUtilities.invokeAndWait(new Runnable() {
+
             public void run()
             {
                 try
@@ -141,6 +142,7 @@
 
         // We launch the installer GUI
         SwingUtilities.invokeLater(new Runnable() {
+
             public void run()
             {
                 try
@@ -221,10 +223,10 @@
         if (npacks != 1)
         {
             LanguageDialog picker = new LanguageDialog(frame, availableLangPacks.toArray());
-            picker.setSelection(Locale.getDefault().getISO3Country().toLowerCase());
+            picker.setSelection(Locale.getDefault().getISO3Language().toLowerCase());
             picker.setModal(true);
             picker.toFront();
-            //frame.setVisible(true);
+            // frame.setVisible(true);
             frame.setVisible(false);
             picker.setVisible(true);
 
@@ -242,6 +244,7 @@
         installdata.setVariable(ScriptParser.ISO3_LANG, installdata.localeISO3);
         InputStream in = getClass().getResourceAsStream("/langpacks/" + selectedPack + ".xml");
         this.installdata.langpack = new LocaleDatabase(in);
+
     }
 
     /**
@@ -288,11 +291,13 @@
         // Resolve whether button icons should be used or not.
         boolean useButtonIcons = true;
         if (installdata.guiPrefs.modifier.containsKey("useButtonIcons")
-                && "no".equalsIgnoreCase((String) installdata.guiPrefs.modifier.get("useButtonIcons"))) useButtonIcons = false;
+                && "no".equalsIgnoreCase((String) installdata.guiPrefs.modifier
+                        .get("useButtonIcons"))) useButtonIcons = false;
         ButtonFactory.useButtonIcons(useButtonIcons);
         boolean useLabelIcons = true;
         if (installdata.guiPrefs.modifier.containsKey("useLabelIcons")
-                && "no".equalsIgnoreCase((String) installdata.guiPrefs.modifier.get("useLabelIcons"))) useLabelIcons = false;
+                && "no".equalsIgnoreCase((String) installdata.guiPrefs.modifier
+                        .get("useLabelIcons"))) useLabelIcons = false;
         LabelFactory.setUseLabelIcons(useLabelIcons);
         if (laf == null)
         {
@@ -419,7 +424,7 @@
             title = installdata.langpack.getString("installer.title")
                     + installdata.info.getAppName();
         else
-        {   // Attention! The alternate message has to contain the hole message including
+        { // Attention! The alternate message has to contain the hole message including
             // $APP_NAME and may be $APP_VER.
             VariableSubstitutor vs = new VariableSubstitutor(installdata.getVariables());
             title = vs.substitute(message, null);
@@ -565,8 +570,7 @@
 
             Dimension frameSize = getSize();
             Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
-            setLocation(center.x - frameSize.width / 2,
-                    center.y - frameSize.height / 2 - 10);
+            setLocation(center.x - frameSize.width / 2, center.y - frameSize.height / 2 - 10);
             setResizable(true);
         }
 




More information about the izpack-changes mailing list