mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
Fix various issues when not using English
This commit is contained in:
parent
0792ad21cd
commit
0c203b0a96
@ -216,6 +216,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)
|
||||
if pref_value < notset_lessthan and pref_value != None:
|
||||
menuitem.set_active(True)
|
||||
if show_activated and pref_value == 1:
|
||||
@ -228,6 +229,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.connect("activate", callback)
|
||||
menu.append(menuitem)
|
||||
|
||||
|
@ -512,7 +512,7 @@
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="menuitem_open_file">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">gtk-open</property>
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_menuitem_open_file_activate"/>
|
||||
|
@ -321,7 +321,7 @@
|
||||
<widget class="GtkImageMenuItem" id="menuitem_queue_top">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="label" translatable="yes">gtk-goto-top</property>
|
||||
<property name="label">gtk-goto-top</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_menuitem_queue_top_activate"/>
|
||||
@ -351,7 +351,7 @@
|
||||
<widget class="GtkImageMenuItem" id="menuitem_queue_bottom">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="label" translatable="yes">gtk-goto-bottom</property>
|
||||
<property name="label">gtk-goto-bottom</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_menuitem_queue_bottom_activate"/>
|
||||
|
@ -355,20 +355,20 @@ class StatusBar(component.Component):
|
||||
|
||||
def _on_set_download_speed(self, widget):
|
||||
log.debug("_on_set_download_speed")
|
||||
value = widget.get_children()[0].get_text().split(" ")[0]
|
||||
log.debug("value: %s", value)
|
||||
if value == "Unlimited":
|
||||
value = -1
|
||||
|
||||
if value == _("Other..."):
|
||||
if widget.get_name() == _("Unlimited"):
|
||||
value = -1
|
||||
elif widget.get_name() == _("Other..."):
|
||||
value = deluge.common.show_other_dialog(
|
||||
_("Download Speed (KiB/s):"), self.max_download_speed)
|
||||
if value == None:
|
||||
return
|
||||
|
||||
# Set the config in the core
|
||||
value = float(value)
|
||||
|
||||
else:
|
||||
value = float(widget.get_children()[0].get_text().split(" ")[0])
|
||||
|
||||
log.debug("value: %s", value)
|
||||
|
||||
# Set the config in the core
|
||||
if value != self.max_download_speed:
|
||||
client.set_config({"max_download_speed": value})
|
||||
|
||||
@ -383,21 +383,20 @@ class StatusBar(component.Component):
|
||||
|
||||
def _on_set_upload_speed(self, widget):
|
||||
log.debug("_on_set_upload_speed")
|
||||
value = widget.get_children()[0].get_text().split(" ")[0]
|
||||
log.debug("value: %s", value)
|
||||
|
||||
if value == "Unlimited":
|
||||
value = -1
|
||||
|
||||
if value == _("Other..."):
|
||||
if widget.get_name() == _("Unlimited"):
|
||||
value = -1
|
||||
elif widget.get_name() == _("Other..."):
|
||||
value = deluge.common.show_other_dialog(
|
||||
_("Upload Speed (KiB/s):"), self.max_upload_speed)
|
||||
if value == None:
|
||||
return
|
||||
|
||||
else:
|
||||
value = float(widget.get_children()[0].get_text().split(" ")[0])
|
||||
|
||||
log.debug("value: %s", value)
|
||||
|
||||
# Set the config in the core
|
||||
value = float(value)
|
||||
|
||||
if value != self.max_upload_speed:
|
||||
client.set_config({"max_upload_speed": value})
|
||||
|
||||
@ -411,21 +410,20 @@ class StatusBar(component.Component):
|
||||
|
||||
def _on_set_connection_limit(self, widget):
|
||||
log.debug("_on_set_connection_limit")
|
||||
value = widget.get_children()[0].get_text().split(" ")[0]
|
||||
log.debug("value: %s", value)
|
||||
|
||||
if value == "Unlimited":
|
||||
if widget.get_name() == _("Unlimited"):
|
||||
value = -1
|
||||
|
||||
if value == _("Other..."):
|
||||
elif widget.get_name() == _("Other..."):
|
||||
value = deluge.common.show_other_dialog(
|
||||
_("Connection Limit:"), self.max_connections)
|
||||
if value == None:
|
||||
return
|
||||
|
||||
# Set the config in the core
|
||||
value = int(value)
|
||||
|
||||
else:
|
||||
value = int(widget.get_children()[0].get_text().split(" ")[0])
|
||||
|
||||
log.debug("value: %s", value)
|
||||
|
||||
# Set the config in the core
|
||||
if value != self.max_connections:
|
||||
client.set_config({"max_connections_global": value})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user