def __call__(self, screen, anaconda):
	timezones = self.getTimezoneList()
	(default, asUtc) = anaconda.timezone.getTimezoneInfo()
        if not default:
	    default = anaconda.instLanguage.getDefaultTimeZone(anaconda.rootPath)

	bb = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON])
	t = TextboxReflowed(30, 
			_("In which time zone are you located?"))

        if not anaconda.ksdata and not hasWindows(anaconda.bootloader):
            asUtc = True

	self.l = Listbox(5, scroll = 1, returnExit = 0)

        for tz in timezones:
	    self.l.append(gettext.ldgettext("system-config-date", tz), tz)

	self.l.setCurrent(default.replace("_", " "))
        
	self.c = Checkbox(_("System clock uses UTC"), isOn = asUtc)

	self.g = GridFormHelp(screen, _("Time Zone Selection"), "timezone",
			      1, 5)
	self.g.add(t, 0, 0)
	self.g.add(self.c, 0, 2, padding = (0, 1, 0, 1), anchorLeft = 1)
	self.g.add(self.l, 0, 3, padding = (0, 0, 0, 1))
	self.g.add(bb, 0, 4, growx = 1)

        result = ""
        while 1:
            result = self.g.run()
            rc = bb.buttonPressed (result)
            
            if rc == TEXT_BACK_CHECK:
                screen.popWindow()
                return INSTALL_BACK
            else:
                break

        screen.popWindow()
	anaconda.timezone.setTimezoneInfo(self.l.current().replace(" ", "_"), asUtc = self.c.selected())

	return INSTALL_OK
    def getScreen(self, anaconda):
	self.intf = anaconda.intf        
        self.timezone = anaconda.timezone
        (self.default, asUTC) = self.timezone.getTimezoneInfo()

        if not self.default:
            self.default = anaconda.instLanguage.getDefaultTimeZone(anaconda.rootPath)
            asUTC = 0

        if (string.find(self.default, "UTC") != -1):
            self.default = "America/New_York"

        self.default = self.default.replace("_", " ")

        self.utcCheckbox.set_active(asUTC)

        if not anaconda.ksdata:
            self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader))

        self.notebook.remove(self.vbox)
        return self.vbox
    def getScreen(self, anaconda):
        self.intf = anaconda.intf
        self.timezone = anaconda.timezone
        (self.default, asUTC) = self.timezone.getTimezoneInfo()

        if not self.default:
            self.default = anaconda.instLanguage.getDefaultTimeZone(
                anaconda.rootPath)
            asUTC = 0

        if (string.find(self.default, "UTC") != -1):
            self.default = "America/New_York"

        self.default = self.default.replace("_", " ")

        self.utcCheckbox.set_active(asUTC)

        if not anaconda.ksdata:
            self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader))

        self.notebook.remove(self.vbox)
        return self.vbox
Пример #4
0
    def getScreen(self, anaconda):
	self.intf = anaconda.intf        
        self.timezone = anaconda.timezone
        (self.default, asUTC) = self.timezone.getTimezoneInfo()

        if not self.default:
            self.default = anaconda.instLanguage.getDefaultTimeZone(anaconda.rootPath)
            asUTC = 0

        if (string.find(self.default, "UTC") != -1):
            self.default = "America/New_York"

        self.default = self.default.replace("_", " ")

        # Now fix the default we set when we made the timezone map widget.
        self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default))
        self.utcCheckbox.set_active(asUTC)

        if not anaconda.ksdata:
            self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader))

        self.notebook.remove(self.vbox)
        return self.vbox
Пример #5
0
    def __call__(self, screen, anaconda):
        timezones = self.getTimezoneList()
        (default, asUtc) = anaconda.timezone.getTimezoneInfo()
        if not default:
            default = anaconda.instLanguage.getDefaultTimeZone(
                anaconda.rootPath)

        bb = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON])
        t = TextboxReflowed(30, _("In which time zone are you located?"))

        if not anaconda.ksdata and not hasWindows(anaconda.bootloader):
            asUtc = True

#
# disabling this for now
#
#	self.label = Label(self.currentTime())

        self.l = Listbox(5, scroll=1, returnExit=0)

        for tz in timezones:
            self.l.append(gettext.ldgettext("system-config-date", tz), tz)

        self.l.setCurrent(default.replace("_", " "))
        #	self.l.setCallback(self.updateClock)

        self.c = Checkbox(_("System clock uses UTC"), isOn=asUtc)
        #	self.c.setCallback(self.updateSysClock)

        self.g = GridFormHelp(screen, _("Time Zone Selection"), "timezone", 1,
                              5)
        self.g.add(t, 0, 0)
        #	self.g.add(self.label, 0, 1, padding = (0, 1, 0, 0), anchorLeft = 1)
        self.g.add(self.c, 0, 2, padding=(0, 1, 0, 1), anchorLeft=1)
        self.g.add(self.l, 0, 3, padding=(0, 0, 0, 1))
        self.g.add(bb, 0, 4, growx=1)

        # disabling for now
        #	self.updateClock()
        #	self.updateSysClock()
        #
        #	self.g.setTimer(500)
        #
        #	result = "TIMER"
        #	while result == "TIMER":
        #	    result = self.g.run()
        #	    if result == "TIMER":
        #		self.updateClock()

        result = ""
        while 1:
            result = self.g.run()
            rc = bb.buttonPressed(result)

            if rc == TEXT_BACK_CHECK:
                screen.popWindow()
                return INSTALL_BACK
            else:
                break

        screen.popWindow()
        anaconda.timezone.setTimezoneInfo(self.l.current().replace(" ", "_"),
                                          asUtc=self.c.selected())

        return INSTALL_OK