]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Daily checkin.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 May 2009 20:23:33 +0000 (22:23 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jul 2009 18:28:07 +0000 (20:28 +0200)
src/pomona/partition.py
src/pomona/storage/formats/__init__.py

index 1eaa4be3f8e7c5b0a44f222fefc494a14dc1757b..3acd670ab1efbe46c6bedfbc89ae03a682ff382a 100644 (file)
@@ -145,7 +145,20 @@ class PartitionWindow(object):
             self.newLV()
 
     def newPart(self):
-        device = self.storage.newPartition()
+        disks = []
+        for disk in self.storage.disks:
+            disks.append(("%s - %s" % (disk.name, disk.model,), disk,))
+
+        (button, disk) = ListboxChoiceWindow(self.installer.intf.screen,
+                                             _("Disk Selection"),
+                                             _("Choose the disk you want create the new "
+                                               "partition on."),
+                                             disks, buttons = [TEXT_OK_BUTTON, TEXT_CANCEL_BUTTON],
+                                             height=len(disks))
+        if button == TEXT_CANCEL_CHECK:
+            return
+
+        device = self.storage.newPartition(parents=disk)
         self.editPart(device=device)
 
     def newVG(self):
@@ -184,12 +197,15 @@ class PartitionWindow(object):
         
         if not device.exists:
             subgrid1 = Grid(2, 1)
-        
-            (devgrid, drivelist) = self.makeDriveList(device)
-            subgrid1.setField(devgrid, 0, 0)
             
             (fsgrid, fstype) = self.makeFileSystemList(device)
-            subgrid1.setField(fsgrid, 1, 0, (1,0,0,0), growx=1)
+            subgrid1.setField(fsgrid, 0, 0)
+
+            #(devgrid, drivelist) = self.makeDriveList(device)
+            #subgrid1.setField(devgrid, 0, 0)
+            
+            #(fsgrid, fstype) = self.makeFileSystemList(device)
+            #subgrid1.setField(fsgrid, 1, 0, (1,0,0,0), growx=1)
             
             grid.add(subgrid1, 0, row, (0,1,0,0), growx=1)
             row += 1
index b271c00a2980ce366b0ae865ee675d9914d4a801..f73f13840b4d7cf7d17784ae02ea0bf42dce02d4 100644 (file)
@@ -31,9 +31,6 @@ def getFormat(fmt_type, *args, **kwargs):
             exists -- whether or not the format exists on the device
 
     """
-
-    #installer = kwargs["installer"]
-
     fmt_class = get_device_format_class(fmt_type)
     fmt = None
     if fmt_class:
@@ -42,7 +39,6 @@ def getFormat(fmt_type, *args, **kwargs):
         className = fmt.__class__.__name__
     except AttributeError:
         className = None
-    #installer.log.debug("getFormat('%s') returning %s instance" % (fmt_type, className))
     return fmt
 
 def get_device_format_class(fmt_type):