[izpack-changes] izpack-src/src/lib/com/izforge/izpack/panels ShortcutPanel.java,1.40,1.40.2.1

jponge nobody at sheep.berlios.de
Tue Jan 3 13:48:37 CET 2006


Update of /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/panels
In directory sheep:/tmp/cvs-serv11741/src/lib/com/izforge/izpack/panels

Modified Files:
      Tag: branch-3-8
	ShortcutPanel.java 
Log Message:
Second round of commits toward 3.8.1.

Index: ShortcutPanel.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/panels/ShortcutPanel.java,v
retrieving revision 1.40
retrieving revision 1.40.2.1
diff -u -d -r1.40 -r1.40.2.1
--- ShortcutPanel.java	11 Sep 2005 08:40:24 -0000	1.40
+++ ShortcutPanel.java	3 Jan 2006 12:48:34 -0000	1.40.2.1
@@ -969,6 +969,7 @@
     {
         if (!create) return;
         ShortcutData data;
+        String tmpgn;
 
         for (int i = 0; i < shortcuts.size(); i++)
         {
@@ -976,7 +977,18 @@
 
             try
             {
-                groupName = groupName + data.subgroup;
+                //The cloning guarantees that data.subgroup will not be null.
+                //See ShortcutData.cloneString
+                if (data.subgroup.length() > 0 
+                        && (data.subgroup.charAt(0) == '/' || data.subgroup.charAt(0) == '\\'))
+                {
+                    tmpgn = groupName + data.subgroup;
+                }
+                else
+                {
+                    tmpgn = groupName + File.separator + data.subgroup;
+                }
+                
                 shortcut.setUserType(itsUserType);
                 shortcut.setLinkName(data.name);
                 shortcut.setLinkType(data.type);
@@ -999,7 +1011,7 @@
 
                 if (data.addToGroup)
                 {
-                    shortcut.setProgramGroup(groupName);
+                    shortcut.setProgramGroup(tmpgn);
                 }
                 else
                 {




More information about the izpack-changes mailing list