summaryrefslogtreecommitdiffstats
path: root/iw/xconfig.py
blob: ce308e35ada70786baf78209fda78eac304972a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from gtk import *
from iw import *
from gui import _

import string
import sys

class XConfigWindow (InstallWindow):
    def __init__ (self, ics):
	InstallWindow.__init__ (self, ics)

        self.todo = ics.getToDo ()
        ics.setTitle (_("X Configuration"))
        ics.setNextEnabled (1)
        ics.setHTML ("<HTML><BODY>This is the X configuration screen<</BODY></HTML>")

    def getScreen (self):
        self.todo.x.probe ()

        box = GtkVBox (FALSE, 50)
        box.set_border_width (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)
        
        label = GtkLabel (_("Autoprobe results:"))
        label.set_alignment (0.0, 0.5)
        box.pack_start (label, FALSE)

        report = self.todo.x.probeReport ()
        report = string.replace (report, '\t', '       ')
        
        result = GtkLabel (report)
        result.set_alignment (0.2, 0.5)
        result.set_justify (JUSTIFY_LEFT)
        box.pack_start (result, FALSE)
        
        test = GtkAlignment ()
        test.set (0.5, 0.5, 0.0, 0.0)
        button = GtkButton (_("Test this configuration"))
        test.add (button)

        custom = GtkCheckButton (_("Customize X Configuration"))

        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)

        return top