diff options
author | 2008-05-13 19:31:04 +0000 | |
---|---|---|
committer | 2008-05-13 19:31:04 +0000 | |
commit | 0f2940b53de66645f2eb472e5cf2f98393ae1327 (patch) | |
tree | e3ff40cc57ce318b45c3c5ed8fa9ae4cf72d4ce2 | |
parent | fix to progress bar overflow bug. (diff) | |
download | gli-0f2940b53de66645f2eb472e5cf2f98393ae1327.tar.gz gli-0f2940b53de66645f2eb472e5cf2f98393ae1327.tar.bz2 gli-0f2940b53de66645f2eb472e5cf2f98393ae1327.zip |
Check for -1 from get_extended_partition() instead of 0
Disable Type dropdown all together for disklabel types that don't support extended partitions
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1900 f8877401-5920-0410-a79b-8e2d7e04ca0d
-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']): |