diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | src/fe/gtk/PartProperties.py | 20 |
2 files changed, 18 insertions, 8 deletions
@@ -2,6 +2,12 @@ # Copyright 2005-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 13 May 2008; Andrew Gaffney <agaffney@gentoo.org> + src/fe/gtk/PartProperties.py: + Check for -1 from get_extended_partition() instead of 0 Disable Type + dropdown all together for disklabel types that don't support extended + partitions + 17 Apr 2008; Andrew Gaffney <agaffney@gentoo.org> src/GLIArchitectureTemplate.py: We don't need to extract metadata.tar.bz2 anymore diff --git a/src/fe/gtk/PartProperties.py b/src/fe/gtk/PartProperties.py index c3f515b..6917a6e 100755 --- a/src/fe/gtk/PartProperties.py +++ b/src/fe/gtk/PartProperties.py @@ -119,17 +119,21 @@ class PartProperties(gtk.Window): def run(self): if self.fstype == "free": self.info_partition.set_text(self.device + _(" (unallocated)")) - if self.part['device'].get_extended_partition(): - if self.part.is_logical(): - self.resize_info_part_type.set_active(1) + if self.part['device']._labelinfo['extended']: + if self.part['device'].get_extended_partition() != -1: + if self.part.is_logical(): + self.resize_info_part_type.set_active(1) + else: + self.resize_info_part_type.set_active(0) + self.resize_info_part_type.set_sensitive(False) else: self.resize_info_part_type.set_active(0) - self.resize_info_part_type.set_sensitive(False) + self.resize_info_part_type.set_sensitive(True) + self.resize_info_part_filesystem.set_active(0) + self.resize_info_part_filesystem.set_sensitive(True) else: self.resize_info_part_type.set_active(0) - self.resize_info_part_type.set_sensitive(True) - self.resize_info_part_filesystem.set_active(0) - self.resize_info_part_filesystem.set_sensitive(True) + self.resize_info_part_type.set_sensitive(False) else: self.info_partition.set_text(self.part['devnode']) if self.part.is_logical(): @@ -151,7 +155,7 @@ class PartProperties(gtk.Window): return if self.fstype == "free": part_size = int(self.resize_info_part_size.get_text()) - if self.resize_info_part_type.get_active() == 1 and self.controller.devices[self.device].get_extended_partition() == 0: # Logical and no extended partition + if self.resize_info_part_type.get_active() == 1 and self.controller.devices[self.device].get_extended_partition() == -1: # Logical and no extended partition extidx = self.part['device'].add_partition(self.idx, self.max_size, "extended") extpart = self.part['device'][extidx] for idx, tmppart in enumerate(self.part['device']): |