diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-01 20:02:53 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-01 20:02:53 +0000 |
commit | 83f6cd3933c270090da0f73b739170700fb186bd (patch) | |
tree | ab2612715148379ef5e36aa96e0d1656fac858fb /iw/xconfig.py | |
parent | cdc89f48dbc26b629adb0d9c037dc839bb8e98f5 (diff) | |
download | anaconda-83f6cd3933c270090da0f73b739170700fb186bd.tar.gz anaconda-83f6cd3933c270090da0f73b739170700fb186bd.tar.xz anaconda-83f6cd3933c270090da0f73b739170700fb186bd.zip |
should write the X config now
Diffstat (limited to 'iw/xconfig.py')
-rw-r--r-- | iw/xconfig.py | 75 |
1 files changed, 59 insertions, 16 deletions
diff --git a/iw/xconfig.py b/iw/xconfig.py index ce308e35a..12a642a94 100644 --- a/iw/xconfig.py +++ b/iw/xconfig.py @@ -5,32 +5,72 @@ from gui import _ import string import sys +""" +_("Video Card") +_("Monitor") +_("Video Ram") +_("Horizontal Frequency Range") +_("Vertical Frequency Range") +_("Test failed") +""" + class XConfigWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) + self.ics.setNextEnabled (FALSE) + self.todo = ics.getToDo () ics.setTitle (_("X Configuration")) - ics.setNextEnabled (1) ics.setHTML ("<HTML><BODY>This is the X configuration screen<</BODY></HTML>") + self.didTest = 0 + + def setNext (self): + if self.skip.get_active () or self.custom.get_active () or self.didTest: + self.ics.setNextEnabled (TRUE) + else: + self.ics.setNextEnabled (FALSE) + + def customToggled (self, widget, *args): + self.setNext () + + def skipToggled (self, widget, *args): + self.autoBox.set_sensitive (not widget.get_active ()) + self.todo.x.skip = widget.get_active () + self.setNext () + + def testPressed (self, widget, *args): + try: + self.todo.x.test () + except RuntimeError: + ### test failed window + pass + else: + self.didTest = 1 + + self.setNext () + def getScreen (self): self.todo.x.probe () - - box = GtkVBox (FALSE, 50) + self.todo.x.filterModesByMemory () + + box = GtkVBox (FALSE, 5) box.set_border_width (5) + self.autoBox = GtkVBox (FALSE, 5) + label = GtkLabel (_("In most cases your video hardware can " "be probed to automatically determine the " "best settings for your display.")) label.set_justify (JUSTIFY_LEFT) label.set_line_wrap (TRUE) label.set_alignment (0.0, 0.5) - box.pack_start (label, FALSE) + self.autoBox.pack_start (label, FALSE) label = GtkLabel (_("Autoprobe results:")) label.set_alignment (0.0, 0.5) - box.pack_start (label, FALSE) + self.autoBox.pack_start (label, FALSE) report = self.todo.x.probeReport () report = string.replace (report, '\t', ' ') @@ -38,20 +78,23 @@ class XConfigWindow (InstallWindow): result = GtkLabel (report) result.set_alignment (0.2, 0.5) result.set_justify (JUSTIFY_LEFT) - box.pack_start (result, FALSE) - + self.autoBox.pack_start (result, FALSE) + test = GtkAlignment () - test.set (0.5, 0.5, 0.0, 0.0) button = GtkButton (_("Test this configuration")) + button.connect ("pressed", self.testPressed) test.add (button) + + self.custom = GtkCheckButton (_("Customize X Configuration")) + self.custom.connect ("toggled", self.customToggled) - custom = GtkCheckButton (_("Customize X Configuration")) + self.skip = GtkCheckButton (_("Skip X Configuration")) + self.skip.connect ("toggled", self.skipToggled) - box.pack_start (test, FALSE) - box.pack_start (custom, FALSE) - - top = GtkAlignment () - top.set (0.5, 0.5, 1.0, 0.0) - top.add (box) + self.autoBox.pack_start (test, FALSE) + self.autoBox.pack_start (self.custom, FALSE) + + box.pack_start (self.autoBox, FALSE) + box.pack_start (self.skip, FALSE) - return top + return box |