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
58
59
60
61
62
63
|
from gtk import *
from iw import *
from gnome.ui import GnomeCanvas
from gui import _
import timezonemap
class Map (GnomeCanvas):
def __init__ (self, map):
self._o = map
class List (GtkScrolledWindow):
def __init__ (self, list):
self._o = list
class Status (GtkStatusbar):
def __init__ (self, bar):
self._o = bar
class Option (GtkOptionMenu):
def __init__ (self, option):
self._o = option
class TimezoneWindow (InstallWindow):
def __init__ (self, ics):
InstallWindow.__init__ (self, ics)
ics.setTitle (_("Time Zone Selection"))
ics.setNextEnabled (1)
ics.setHTML ("<HTML><BODY>Select your current location</BODY></HTML>")
def getScreen (self):
try:
f = open ("/usr/share/anaconda/map480.png")
f.close ()
except:
path = "gnome-map/map480.png"
else:
path = "/usr/share/anaconda/map480.png"
mainBox = GtkVBox (FALSE, 0)
tz = timezonemap.new (path)
map = Map (tz.map)
list = List (tz.citylist)
status = Status (tz.statusbar)
views = Option (tz.views)
label = GtkLabel (_("View"))
hbox = GtkHBox (FALSE, 5)
hbox.pack_start (label, FALSE)
hbox.pack_start (views, FALSE)
frame = GtkFrame ()
frame.set_shadow_type (SHADOW_IN)
frame.add (map)
mainBox.pack_start (hbox, FALSE)
mainBox.pack_start (frame, FALSE)
mainBox.pack_start (status, FALSE)
mainBox.pack_start (list, TRUE)
return mainBox
|