summaryrefslogtreecommitdiffstats
path: root/iw/format.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-12 18:58:12 +0000
committerMatt Wilson <msw@redhat.com>1999-08-12 18:58:12 +0000
commit8a211912479d503a211b597b8053b169f9a4b285 (patch)
tree48964a5739042de096761f6bbdde31f066bf51b1 /iw/format.py
parent3ced20c04db38a7d97b97d213f307d64a0d81477 (diff)
downloadanaconda-8a211912479d503a211b597b8053b169f9a4b285.tar.gz
anaconda-8a211912479d503a211b597b8053b169f9a4b285.tar.xz
anaconda-8a211912479d503a211b597b8053b169f9a4b285.zip
added format window
Diffstat (limited to 'iw/format.py')
-rw-r--r--iw/format.py40
1 files changed, 40 insertions, 0 deletions
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 ("<HTML><BODY>Choose partitions to Format</BODY></HTML>")
+
+ 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