diff --git a/ChangeLog b/ChangeLog index 1c3f90fbc..37a0ef551 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Deluge 0.9.09 - "1.0.0_RC9" (In Development) GtkUI: * Fix add torrent dialog closing preventing another dialog from being shown + * Fix various issues when not using English Deluge 0.9.08 - "1.0.0_RC8" (27 August 2008) Core: diff --git a/deluge/common.py b/deluge/common.py index 69a3a57de..eb931ee5d 100644 --- a/deluge/common.py +++ b/deluge/common.py @@ -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) diff --git a/deluge/ui/gtkui/glade/main_window.glade b/deluge/ui/gtkui/glade/main_window.glade index 33c337044..dde77a6ce 100644 --- a/deluge/ui/gtkui/glade/main_window.glade +++ b/deluge/ui/gtkui/glade/main_window.glade @@ -512,7 +512,7 @@ True - gtk-open + gtk-open True True diff --git a/deluge/ui/gtkui/glade/torrent_menu.glade b/deluge/ui/gtkui/glade/torrent_menu.glade index 60fa3fb99..4abd708e8 100644 --- a/deluge/ui/gtkui/glade/torrent_menu.glade +++ b/deluge/ui/gtkui/glade/torrent_menu.glade @@ -321,7 +321,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-goto-top + gtk-goto-top True True @@ -331,7 +331,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-go-up + gtk-go-up True True @@ -341,7 +341,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-go-down + gtk-go-down True True @@ -351,7 +351,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-goto-bottom + gtk-goto-bottom True True diff --git a/deluge/ui/gtkui/statusbar.py b/deluge/ui/gtkui/statusbar.py index 33a86018d..b78aa0df3 100644 --- a/deluge/ui/gtkui/statusbar.py +++ b/deluge/ui/gtkui/statusbar.py @@ -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,23 +383,21 @@ 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}) def _on_connection_item_clicked(self, widget, event): menu = deluge.common.build_menu_radio_list( @@ -411,21 +409,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})