aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe/gtk/PartProperties.py')
-rwxr-xr-xsrc/fe/gtk/PartProperties.py20
1 files changed, 12 insertions, 8 deletions
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']):