From 8a211912479d503a211b597b8053b169f9a4b285 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 12 Aug 1999 18:58:12 +0000 Subject: added format window --- iw/format.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 iw/format.py (limited to 'iw') diff --git a/iw/format.py b/iw/format.py new file mode 100644 index 000000000..a50c91447 --- /dev/null +++ b/iw/format.py @@ -0,0 +1,40 @@ +from gtk import * +from iw import * +from thread import * +import isys + +class FormatWindow (InstallWindow): + def __init__ (self, ics): + InstallWindow.__init__ (self, ics) + + self.todo = ics.getToDo () + ics.setTitle ("Choose partitions to Format") + ics.setNextEnabled (1) + ics.setHTML ("Choose partitions to Format") + + def getScreen (self): + def toggled (widget, (todo, mount)): + if widget.get_active (): + (dev, fstype, format) = todo.mounts[mount] + todo.mounts[mount] = (dev, fstype, 1) + else: + (dev, fstype, format) = todo.mounts[mount] + todo.mounts[mount] = (dev, fstype, 0) + + box = GtkVBox (FALSE, 10) + + mounts = self.todo.mounts.keys () + mounts.sort () + + for mount in mounts: + (dev, fstype, format) = self.todo.mounts[mount] + if fstype == "ext2": + checkButton = GtkCheckButton ("/dev/%s %s" % (dev, mount)) + checkButton.set_active (format) + checkButton.connect ("toggled", toggled, (self.todo, mount)) + box.pack_start (checkButton) + + vbox = GtkVBox (FALSE, 10) + vbox.pack_start (box, FALSE) + + return vbox -- cgit