diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-06-23 03:21:16 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-06-23 03:21:16 +0000 |
commit | c90a4fa19ff7b2effcf645748c84896ff45cdc96 (patch) | |
tree | a588ed7cb3f6faca73264f316ed711dcfd748f25 | |
parent | 2f534ef8322cdfd0e353ab3f60409c7b1851a76e (diff) | |
download | anaconda-c90a4fa19ff7b2effcf645748c84896ff45cdc96.tar.gz anaconda-c90a4fa19ff7b2effcf645748c84896ff45cdc96.tar.xz anaconda-c90a4fa19ff7b2effcf645748c84896ff45cdc96.zip |
auto partitioning
-rw-r--r-- | text.py | 3 | ||||
-rw-r--r-- | textw/partition_text.py | 37 |
2 files changed, 37 insertions, 3 deletions
@@ -34,8 +34,7 @@ stepToClasses = { "welcome" : ("welcome_text", "WelcomeWindow" ), "reconfigwelcome" : ("welcome_text", "ReconfigWelcomeWindow" ), "installtype" : ("installpath_text", "InstallPathWindow" ), - "autopartition" : ("partitioning_text", ( "AutoPartitionWindow", - "PartitionMethod" ) ), + "autopartition" : ("partition_text", "AutoPartitionWindow"), "custom-upgrade" : ("upgrade_text", "UpgradeExamineWindow" ), "addswap" : ("upgrade_text", "UpgradeSwapWindow" ), "fdisk" : ("partitioning_text", "ManualPartitionWindow" ), diff --git a/textw/partition_text.py b/textw/partition_text.py index 1076b60ea..f8343b65f 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -21,7 +21,7 @@ import copy import parted from partitioning import * from fsset import * -from autopart import doPartitioning +from autopart import * from snack import * from constants_text import * from translate import _ @@ -790,3 +790,38 @@ class PartitionWindow: screen.popWindow() return INSTALL_OK + + +class AutoPartitionWindow: + def __call__(self, screen, type, cleardrives, diskset, intf): + self.screen = screen + self.type = type + self.cleardrives = cleardrives + self.diskset = diskset + self.intf = intf + + if type == CLEARPART_TYPE_LINUX: + clearstring = "all Linux partitions" + elif type == CLEARPART_TYPE_ALL: + clearstring = "all partitions" + else: + clearstring = "no partitions" + + if not cleardrives or len(cleardrives) < 1: + cleardrivestring = "on all drives" + else: + cleardrivestring = "on these drives: " + for drive in cleardrives: + cleardrivestring = cleardrivestring + drive + " " + + rc = ButtonChoiceWindow(self.screen, _("Autopartitioning"), + _("Autopartitioning will remove %s %s" % + (clearstring, cleardrivestring)), + buttons = [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ]) + + if rc == TEXT_BACK_CHECK: + self.screen.popWindow() + return INSTALL_BACK + + return INSTALL_OK + |