summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2012-11-25 14:38:29 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2012-11-26 02:03:20 +0000
commit0f16faabcb5153c55a8a45997e89b267e9d973fd (patch)
tree324ed1ae54045bc1e419b24c6c3918bb36305d85
parent508b5aed8f2bd90ead0e8d08ac9804efa502f516 (diff)
downloaddeluge-0f16faabcb5153c55a8a45997e89b267e9d973fd.zip
deluge-0f16faabcb5153c55a8a45997e89b267e9d973fd.tar.gz
deluge-0f16faabcb5153c55a8a45997e89b267e9d973fd.tar.bz2
Fix use of translated text for widget name in build_menu_radio_list
-rw-r--r--deluge/ui/gtkui/common.py4
-rw-r--r--deluge/ui/gtkui/statusbar.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/deluge/ui/gtkui/common.py b/deluge/ui/gtkui/common.py
index 8714e0b..a7715ed 100644
--- a/deluge/ui/gtkui/common.py
+++ b/deluge/ui/gtkui/common.py
@@ -112,7 +112,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:
@@ -125,7 +125,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)
diff --git a/deluge/ui/gtkui/statusbar.py b/deluge/ui/gtkui/statusbar.py
index a187866..8682f69 100644
--- a/deluge/ui/gtkui/statusbar.py
+++ b/deluge/ui/gtkui/statusbar.py
@@ -394,9 +394,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:
@@ -422,9 +422,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:
@@ -449,9 +449,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: