/[gli]/branches/overhaul/src/fe/gtk/Timezone.py
Gentoo

Contents of /branches/overhaul/src/fe/gtk/Timezone.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1623 - (show annotations) (download) (as text)
Fri Jan 19 10:19:38 2007 UTC (7 years, 7 months ago) by agaffney
File MIME type: text/x-python
File size: 2198 byte(s)
remove Help button
rearrange Stage screen
1 # Copyright 1999-2005 Gentoo Foundation
2 # This source code is distributed under the terms of version 2 of the GNU
3 # General Public License as published by the Free Software Foundation, a copy
4 # of which can be found in the main directory of this project.
5
6 import gtk
7 import GLIScreen
8 import os
9 import string
10 import timezone_map_gui
11 import zonetab
12 from Widgets import Widgets
13
14 class Panel(GLIScreen.GLIScreen):
15 """
16 The Timezone section of the installer.
17
18 @author: John N. Laliberte <allanonjl@gentoo.org>
19 @license: GPL
20 """
21 # Attributes:
22 title="Timezone"
23 _helptext = """
24 <b><u>Timezone</u></b>
25
26 You're joking right? Pick your timezone, or pick UTC. If you dual-boot with
27 Windows you'll want to choose your local timezone. If your BIOS clock is set to
28 local time you'll also want to chosoe your local timezone.
29
30 If you choose a local timezone, you'll want to choose "local" for the clock
31 setting later on in the Other Settings screen.
32 """
33
34 # Operations
35 def __init__(self, controller):
36 GLIScreen.GLIScreen.__init__(self, controller)
37
38 vert = gtk.VBox(False, 10) # This box is content so it should fill space to force title to top
39 horiz = gtk.HBox(False, 10)
40
41 self.zonetab2 = zonetab.ZoneTab()
42 self.map = timezone_map_gui.TimezoneMap(self.zonetab2)
43
44 vert.pack_start(self.map, expand=True, fill=True, padding=5)
45
46 self.add_content(vert)
47 self.show_all()
48
49 def activate(self):
50 # grab from the install profile, and if its not blank, create it
51 try:
52 loaded = self.controller.install_profile.get_time_zone()
53 self.map.default = loaded
54 except:
55 # this isn't a valid timezone entry, or its not set!
56 print "Invalid timezone or timezone not set."
57
58 self.controller.SHOW_BUTTON_EXIT = True
59 # self.controller.SHOW_BUTTON_HELP = True
60 self.controller.SHOW_BUTTON_BACK = True
61 self.controller.SHOW_BUTTON_FORWARD = True
62 self.controller.SHOW_BUTTON_FINISH = False
63
64 def deactivate(self):
65 try:
66 # retrieve the current selected timezone
67 self.controller.install_profile.set_time_zone(None, self.map.getCurrent().tz, None)
68 except:
69 # page loading for the first time, no timezone is selected for
70 # NoneType
71 pass
72
73 return True

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.20