diff options
author | Mike Fulbright <msf@redhat.com> | 2001-06-25 19:07:54 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-06-25 19:07:54 +0000 |
commit | 656359e03d1c836ba1232b91f8b521f2f5623100 (patch) | |
tree | b76ec2f91bf4df8e3bf61f6b25444c50afa422a4 /iw | |
parent | 17ca1c75dc2e7f76555ee49329bdf50d95c100a7 (diff) | |
download | anaconda-656359e03d1c836ba1232b91f8b521f2f5623100.tar.gz anaconda-656359e03d1c836ba1232b91f8b521f2f5623100.tar.xz anaconda-656359e03d1c836ba1232b91f8b521f2f5623100.zip |
add partition method to GUI, rework to use skiplist
Diffstat (limited to 'iw')
-rw-r--r-- | iw/fdisk_gui.py | 13 | ||||
-rw-r--r-- | iw/partition_gui.py | 3 | ||||
-rw-r--r-- | iw/partmethod_gui.py | 54 |
3 files changed, 60 insertions, 10 deletions
diff --git a/iw/fdisk_gui.py b/iw/fdisk_gui.py index eee1acae6..1d59d671d 100644 --- a/iw/fdisk_gui.py +++ b/iw/fdisk_gui.py @@ -2,6 +2,7 @@ from gtk import * from iw_gui import * from gnome.zvt import * from translate import _ +from dispatch import DISPATCH_NOOP import isys import os @@ -11,6 +12,14 @@ class FDiskWindow (InstallWindow): ics.setTitle (_("fdisk")) ics.readHTML ("fdisk") + def getNext(self): + + # reread partitions + self.partrequests.setFromDisk(self.diskset) + + return None + + def child_died (self, widget, button): self.windowContainer.remove (self.windowContainer.children ()[0]) self.windowContainer.pack_start (self.buttonBox) @@ -54,8 +63,10 @@ class FDiskWindow (InstallWindow): self.ics.setNextEnabled (0) # FDiskWindow tag="fdisk" - def getScreen (self, diskset): + def getScreen (self, useFdisk, diskset, partrequests): + self.diskset = diskset + self.partrequests = partrequests self.windowContainer = GtkVBox (FALSE) self.buttonBox = GtkVBox (FALSE, 5) diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 072186c93..584b0d6df 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -17,6 +17,7 @@ from iw_gui import * from gtk import * from GDK import * from gnome.ui import * +from dispatch import DISPATCH_NOOP from translate import _, N_ from partitioning import * from fsset import * @@ -1268,8 +1269,6 @@ class PartitionWindow(InstallWindow): return box - - class AutoPartitionWindow(InstallWindow): def __init__(self, ics): InstallWindow.__init__(self, ics) diff --git a/iw/partmethod_gui.py b/iw/partmethod_gui.py index 4c3a753d4..83733a939 100644 --- a/iw/partmethod_gui.py +++ b/iw/partmethod_gui.py @@ -23,24 +23,64 @@ class PartitionMethodWindow(InstallWindow): ics.setTitle (_("Automatic Partitioning")) def getNext(self): + if self.useFdisk.get_active(): - self.dispatch.skipStep("fdisk", skip = 0) - else: - self.dispatch.skipStep("fdisk") + self.id.useAutopartitioning = 0 + self.id.useFdisk = 1 + elif self.useAuto.get_active(): + self.id.useAutopartitioning = 1 + self.id.useFdisk = 0 + else: + self.id.useAutopartitioning = 0 + self.id.useFdisk = 0 + return None - def getScreen (self, dispatch): - self.dispatch = dispatch + def getScreen (self, id): + + # XXX Change to not use id in (use more specific components of id) + self.id = id box = GtkVBox (FALSE) box.set_border_width (5) + label = GtkLabel( + _("Autopartitioning sets up your partitioning in a reasonable " + "way depending on your installation type and then gives you a " + "chance to customize this setup.\n" + "\n" + "Disk Shaman is a tool designed for partitioning and setting " + "up mount points. It is designed to be easier to use than " + "Linux's traditional disk partitioning software, fdisk, as " + "well as more powerful. However, there are some cases where " + "fdisk may be preferred.\n" + "\n" + "Which tool would you like to use?")) + + label.set_line_wrap(1) + label.set_alignment(0.0, 0.0) + label.set_usize(400, -1) + + box.pack_start(label) + radioBox = GtkVBox (FALSE) + self.useAuto = GtkRadioButton( + None, _("Have the installer autopartition for you")) + radioBox.pack_start(self.useAuto, FALSE) + self.useDS = GtkRadioButton( + self.useAuto, _("Manually partition with Disk Shaman")) + radioBox.pack_start(self.useDS, FALSE) self.useFdisk = GtkRadioButton( - None, _("Manually partition with fdisk [experts only]")) + self.useAuto, _("Manually partition with fdisk [experts only]")) radioBox.pack_start(self.useFdisk, FALSE) - self.useFdisk.set_active (not dispatch.stepInSkipList("fdisk")) + + if id.useAutopartitioning: + self.useAuto.set_active(1) + elif id.useFdisk: + self.useFdisk.set_active(1) + else: + self.useDS.set_active(1) align = GtkAlignment() align.add(radioBox) |