summaryrefslogtreecommitdiffstats
path: root/iw/timezone.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-27 14:25:08 +0000
committerMatt Wilson <msw@redhat.com>1999-08-27 14:25:08 +0000
commit06beb667fb8a7ce2397a2ac4176324d015df5f78 (patch)
tree37f565e687ea76a14766c9ff16540d33a8fec60e /iw/timezone.py
parent9170e20414e11d216a33d8053e52ef8ed6f80a31 (diff)
downloadanaconda-06beb667fb8a7ce2397a2ac4176324d015df5f78.tar.gz
anaconda-06beb667fb8a7ce2397a2ac4176324d015df5f78.tar.xz
anaconda-06beb667fb8a7ce2397a2ac4176324d015df5f78.zip
added timezone
Diffstat (limited to 'iw/timezone.py')
-rw-r--r--iw/timezone.py64
1 files changed, 64 insertions, 0 deletions
diff --git a/iw/timezone.py b/iw/timezone.py
new file mode 100644
index 000000000..c9dae87a8
--- /dev/null
+++ b/iw/timezone.py
@@ -0,0 +1,64 @@
+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.setPrevEnabled (0)
+ 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 ()
+ 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
+