[PC-BSD Commits] r739 - pcbsd/trunk/PCInstall

svn at pcbsd.org svn at pcbsd.org
Mon Sep 17 04:07:31 PDT 2007


Author: tim
Date: 2007-09-17 04:07:31 -0700 (Mon, 17 Sep 2007)
New Revision: 739

Modified:
   pcbsd/trunk/PCInstall/pcinstall.ui
   pcbsd/trunk/PCInstall/pcinstall.ui.h
Log:
Allow selection of multiple components at once

Modified: pcbsd/trunk/PCInstall/pcinstall.ui
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui	2007-09-17 10:13:24 UTC (rev 738)
+++ pcbsd/trunk/PCInstall/pcinstall.ui	2007-09-17 11:07:31 UTC (rev 739)
@@ -29,7 +29,6 @@
     </property>
     <property name="font">
         <font>
-            <family>DejaVu Sans</family>
         </font>
     </property>
     <property name="caption">
@@ -5071,40 +5070,6 @@
                     <string>Selected Components</string>
                 </property>
             </widget>
-            <widget class="QListBox">
-                <property name="name">
-                    <cstring>listAvailComponents</cstring>
-                </property>
-                <property name="geometry">
-                    <rect>
-                        <x>20</x>
-                        <y>40</y>
-                        <width>570</width>
-                        <height>120</height>
-                    </rect>
-                </property>
-                <property name="font">
-                    <font>
-                    </font>
-                </property>
-            </widget>
-            <widget class="QListBox">
-                <property name="name">
-                    <cstring>listSelectedComponents</cstring>
-                </property>
-                <property name="geometry">
-                    <rect>
-                        <x>20</x>
-                        <y>240</y>
-                        <width>570</width>
-                        <height>120</height>
-                    </rect>
-                </property>
-                <property name="font">
-                    <font>
-                    </font>
-                </property>
-            </widget>
             <widget class="QPushButton">
                 <property name="name">
                     <cstring>pushAddComponent</cstring>
@@ -5146,6 +5111,46 @@
                     <pixmap>image14</pixmap>
                 </property>
             </widget>
+            <widget class="QListBox">
+                <property name="name">
+                    <cstring>listAvailComponents</cstring>
+                </property>
+                <property name="geometry">
+                    <rect>
+                        <x>20</x>
+                        <y>40</y>
+                        <width>570</width>
+                        <height>120</height>
+                    </rect>
+                </property>
+                <property name="font">
+                    <font>
+                    </font>
+                </property>
+                <property name="selectionMode">
+                    <enum>Extended</enum>
+                </property>
+            </widget>
+            <widget class="QListBox">
+                <property name="name">
+                    <cstring>listSelectedComponents</cstring>
+                </property>
+                <property name="geometry">
+                    <rect>
+                        <x>20</x>
+                        <y>240</y>
+                        <width>570</width>
+                        <height>120</height>
+                    </rect>
+                </property>
+                <property name="font">
+                    <font>
+                    </font>
+                </property>
+                <property name="selectionMode">
+                    <enum>Extended</enum>
+                </property>
+            </widget>
         </widget>
     </widget>
     <widget class="QWidget">

Modified: pcbsd/trunk/PCInstall/pcinstall.ui.h
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui.h	2007-09-17 10:13:24 UTC (rev 738)
+++ pcbsd/trunk/PCInstall/pcinstall.ui.h	2007-09-17 11:07:31 UTC (rev 739)
@@ -2872,10 +2872,6 @@
 {
     
     int foundItem = 0;
-    int lookingItem = listAvailComponents->currentItem() ;
-    
-    if ( lookingItem != -1 )
-    {
 	for ( int i = 0; i < 100; i++ )
 	{
 	    if ( ComponentDir[i].isEmpty() )
@@ -2886,17 +2882,13 @@
 	       if ( ComponentSelected[i] == 0 )
 	       {
 		   // Looks for the item selected and matches it in the list
-		   if ( foundItem == lookingItem ) {
+		   if (listAvailComponents->isSelected(foundItem)) {
 		       ComponentSelected[i] = 1;
-		       break;
-		   } else {
-		       foundItem++;
-		   }   
+		   }
+		   foundItem++;
 	       }
 	    
 	}
-	
-    }
 
     
     refreshComponents();
@@ -2907,10 +2899,7 @@
 {
     
     int foundItem = 0;
-    int lookingItem = listSelectedComponents->currentItem() ;
     
-    if ( lookingItem != -1 )
-    {
 	for ( int i = 0; i < 100; i++ )
 	{
 	    if ( ComponentDir[i].isEmpty() )
@@ -2921,17 +2910,13 @@
 	       if ( ComponentSelected[i] == 1 )
 	       {
 		   // Looks for the item selected and matches it in the list
-		   if ( foundItem == lookingItem ) {
+		   if (listSelectedComponents->isSelected(foundItem)) {
 		       ComponentSelected[i] = 0;
-		       break;
-		   } else {
-		       foundItem++;
-		   }   
+		   }
+		   foundItem++;
 	       }
 	    
 	}
-		
-    }
     
     refreshComponents();
 }



More information about the Commits mailing list