From 96d132880b371e7a412220dda3b56929aa0822c6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 13 Aug 2001 20:59:26 +0000 Subject: now we can set mountpoints for protected partitions. the gui actually already had all the right magic (51393) --- textw/partition_text.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'textw') diff --git a/textw/partition_text.py b/textw/partition_text.py index 8262e3e15..59b6a1f51 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -589,7 +589,7 @@ class PartitionWindow: fsoptLbl = None - else: + elif origrequest.type == REQUEST_PREEXIST and origrequest.fstype: # set some defaults format = origrequest.format @@ -634,7 +634,7 @@ class PartitionWindow: poplevel.add(subgrid, 0, row, (0,1,0,0)) row = row + 1 - if origrequest.type == REQUEST_NEW: + if origrequest.type == REQUEST_NEW or origrequest.type == REQUEST_PROTECTED: popbb = ButtonBar(self.screen, (TEXT_OK_BUTTON, TEXT_CANCEL_BUTTON)) else: popbb = ButtonBar(self.screen, (TEXT_OK_BUTTON, @@ -752,14 +752,17 @@ class PartitionWindow: else: request = copy.copy(origrequest) - request.fstype = newfstype + if request.type == REQUEST_PREEXIST: + request.fstype = newfstype + if request.fstype.isMountable(): request.mountpoint = self.mount.value() - request.format = format - request.migrate = migrate - request.fstype = newfstype - request.badblocks = badblocks + if request.type == REQUEST_PREEXIST: + request.format = format + request.migrate = migrate + request.fstype = newfstype + request.badblocks = badblocks err = sanityCheckPartitionRequest(self.partitions, request) if err: -- cgit