def timezone_widget_create(self, str1, str2, int1, int2): mappath = "/usr/share/system-config-date/pixmaps/map1440.png" self.tz = TimezoneMap(self.zonetab, self.default, map=mappath, viewportWidth=480) self.tz.show_all() return self.tz
def getScreen(self, instLang, timezone): self.timezone = timezone try: f = open("/usr/share/anaconda/pixmaps/map480.png") f.close() except: path = "pixmaps/map480.png" else: path = "/usr/share/anaconda/pixmaps/map480.png" mainBox = gtk.VBox(gtk.FALSE, 5) zonetab = ZoneTab() self.tz = TimezoneMap(zonetab=zonetab, map=path) (self.default, asUTC, asArc) = self.timezone.getTimezoneInfo() self.langDefault = instLang.getDefaultTimeZone() if not self.default: self.default = self.langDefault asUTC = 0 if (string.find(self.default, "UTC") != -1): self.default = "America/New_York" self.tz.setCurrent(zonetab.findEntryByTZ(self.default)) self.systemUTC = gtk.CheckButton(_("System clock uses _UTC")) self.systemUTC.set_active(asUTC) hbox = gtk.HBox(gtk.FALSE, 5) pix = self.ics.readPixmap("timezone.png") if pix: hbox.pack_start(pix, gtk.FALSE) hbox.pack_start( gtk.Label(_("Please select the nearest city in your timezone:")), gtk.FALSE) mainBox.pack_start(hbox, gtk.FALSE) mainBox.pack_start(self.tz, gtk.TRUE, gtk.TRUE) mainBox.pack_start(self.systemUTC, gtk.FALSE) mainBox.set_border_width(5) box = gtk.VBox(gtk.FALSE, 5) box.pack_start(mainBox) box.set_border_width(5) return box