From: Stefan Pluecken Date: Fri, 16 Dec 2005 23:57:19 +0000 (+0000) Subject: fix some more _() comparisons X-Git-Tag: 2.6.0~4688 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/28ec4d16dee857ba725ce9a376fb69829bff0592?ds=sidebyside fix some more _() comparisons --- diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py index 3d64f522..7633a18c 100644 --- a/lib/python/Screens/NetworkSetup.py +++ b/lib/python/Screens/NetworkSetup.py @@ -37,7 +37,8 @@ class NetworkSetup(Screen): def createSetup(self): self.list = [] - self.list.append(getConfigListEntry(_("Use DHCP"), config.network.dhcp)) + self.dhcpEntry = getConfigListEntry(_("Use DHCP"), config.network.dhcp) + self.list.append(self.dhcpEntry) self.list.append(getConfigListEntry(_('IP Address'), config.network.ip)) if (config.network.dhcp.value == 0): self.list.append(getConfigListEntry(_('Netmask'), config.network.netmask)) @@ -49,7 +50,7 @@ class NetworkSetup(Screen): def newConfig(self): print self["config"].getCurrent() - if self["config"].getCurrent()[0] == _("Use DHCP"): + if self["config"].getCurrent() == self.dhcpEntry: self.createSetup() def keyLeft(self): diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index 64372625..a7cbad9b 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -127,12 +127,14 @@ class TimerEntry(Screen): def createSetup(self): self.list = [] self.list.append(getConfigListEntry(_("Description"), config.timerentry.description)) - self.list.append(getConfigListEntry(_("Timer Type"), config.timerentry.type)) + self.timerTypeEntry = getConfigListEntry(_("Timer Type"), config.timerentry.type) + self.list.append(self.timerTypeEntry) if (config.timerentry.type.value == 0): # once pass else: # repeated - self.list.append(getConfigListEntry(_("Frequency"), config.timerentry.repeated)) + self.frequencyEntry = getConfigListEntry(_("Frequency"), config.timerentry.repeated) + self.list.append(self.frequencyEntry) if (config.timerentry.repeated.value == 0): # daily pass if (config.timerentry.repeated.value == 2): # Mon-Fri @@ -163,20 +165,21 @@ class TimerEntry(Screen): else: self.list.append(getConfigListEntry(_("EndTime"), config.timerentry.endtime)) - self.list.append(getConfigListEntry(_("Channel"), config.timerentry.service)) + self.channelEntry = getConfigListEntry(_("Channel"), config.timerentry.service) + self.list.append(self.channelEntry) self["config"].list = self.list self["config"].l.setList(self.list) def newConfig(self): print self["config"].getCurrent() - if self["config"].getCurrent()[0] == _("Timer Type"): + if self["config"].getCurrent() == self.timerTypeEntry: self.createSetup() - if self["config"].getCurrent()[0] == _("Frequency"): + if self["config"].getCurrent() == self.frequencyEntry: self.createSetup() def keyLeft(self): - if self["config"].getCurrent()[0] == _("Channel"): + if self["config"].getCurrent() == self.channelEntry: self.keySelect() else: self["config"].handleKey(config.key["prevElement"]) @@ -192,14 +195,14 @@ class TimerEntry(Screen): self.keyRight() def keyRight(self): - if self["config"].getCurrent()[0] == _("Channel"): + if self["config"].getCurrent() == self.channelEntry: self.keySelect() else: self["config"].handleKey(config.key["nextElement"]) self.newConfig() def keySelect(self): - if self["config"].getCurrent()[0] == _("Channel"): + if self["config"].getCurrent() == self.channelEntry: self.session.openWithCallback(self.finishedChannelSelection, ChannelSelection.SimpleChannelSelection, _("Select channel to record from")) def finishedChannelSelection(self, args):