Fix use of translated text for widget name in build_menu_radio_list
This commit is contained in:
parent
751bc317ea
commit
09e43f3e41
|
@ -111,7 +111,7 @@ def build_menu_radio_list(value_list, callback, pref_value=None,
|
|||
|
||||
if show_notset:
|
||||
menuitem = gtk.RadioMenuItem(group, notset_label)
|
||||
menuitem.set_name(notset_label)
|
||||
menuitem.set_name("unlimited")
|
||||
if pref_value < notset_lessthan and pref_value != None:
|
||||
menuitem.set_active(True)
|
||||
if show_activated and pref_value == 1:
|
||||
|
@ -124,7 +124,7 @@ def build_menu_radio_list(value_list, callback, pref_value=None,
|
|||
menuitem = gtk.SeparatorMenuItem()
|
||||
menu.append(menuitem)
|
||||
menuitem = gtk.MenuItem(_("Other..."))
|
||||
menuitem.set_name(_("Other..."))
|
||||
menuitem.set_name("other")
|
||||
menuitem.connect("activate", callback)
|
||||
menu.append(menuitem)
|
||||
|
||||
|
|
|
@ -392,9 +392,9 @@ class StatusBar(component.Component):
|
|||
def _on_set_download_speed(self, widget):
|
||||
log.debug("_on_set_download_speed")
|
||||
|
||||
if widget.get_name() == _("Unlimited"):
|
||||
if widget.get_name() == "unlimited":
|
||||
value = -1
|
||||
elif widget.get_name() == _("Other..."):
|
||||
elif widget.get_name() == "other":
|
||||
value = common.show_other_dialog(
|
||||
_("Set Maximum Download Speed"), _("KiB/s"), None, "downloading.svg", self.max_download_speed)
|
||||
if value == None:
|
||||
|
@ -420,9 +420,9 @@ class StatusBar(component.Component):
|
|||
def _on_set_upload_speed(self, widget):
|
||||
log.debug("_on_set_upload_speed")
|
||||
|
||||
if widget.get_name() == _("Unlimited"):
|
||||
if widget.get_name() == "unlimited":
|
||||
value = -1
|
||||
elif widget.get_name() == _("Other..."):
|
||||
elif widget.get_name() == "other":
|
||||
value = common.show_other_dialog(
|
||||
_("Set Maximum Upload Speed"), _("KiB/s"), None, "seeding.svg", self.max_upload_speed)
|
||||
if value == None:
|
||||
|
@ -447,9 +447,9 @@ class StatusBar(component.Component):
|
|||
def _on_set_connection_limit(self, widget):
|
||||
log.debug("_on_set_connection_limit")
|
||||
|
||||
if widget.get_name() == _("Unlimited"):
|
||||
if widget.get_name() == "unlimited":
|
||||
value = -1
|
||||
elif widget.get_name() == _("Other..."):
|
||||
elif widget.get_name() == "other":
|
||||
value = common.show_other_dialog(
|
||||
_("Set Maximum Connections"), "", gtk.STOCK_NETWORK, None, self.max_connections)
|
||||
if value == None:
|
||||
|
|
Loading…
Reference in New Issue