diff --git a/glade/dgtkpopups.glade b/glade/dgtkpopups.glade index 655490697..d4b7116e9 100644 --- a/glade/dgtkpopups.glade +++ b/glade/dgtkpopups.glade @@ -1,6 +1,6 @@ - + Remove Torrent @@ -254,10 +254,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Speed: False diff --git a/plugins/DesiredRatio/__init__.py b/plugins/DesiredRatio/__init__.py index 3e0bf6296..247a5ad14 100644 --- a/plugins/DesiredRatio/__init__.py +++ b/plugins/DesiredRatio/__init__.py @@ -32,7 +32,7 @@ def enable(core, interface): ### The Plugin ### DEFAULT_PREFS = { - "ratios": [1.0, 1.5, 2.0, 3.0] + "ratios": [1.0, 1.5, 2.0, 2.5, 3.0] } import deluge @@ -64,7 +64,7 @@ class DesiredRatio: - self.ratio_menu = self.interface.build_menu_radio_list(self.config.get("ratios"), self.ratio_clicked, self.get_torrent_desired_ratio(), None, True, _("_Not Set"), 1) + self.ratio_menu = self.interface.build_menu_radio_list(self.config.get("ratios"), self.ratio_clicked, self.get_torrent_desired_ratio(), None, True, _("_Not Set"), 1, None) self.ratio_menuitem.set_submenu(self.ratio_menu) self.interface.torrent_menu.append(self.ratio_menuitem) @@ -102,6 +102,8 @@ class DesiredRatio: if value == _("Other..."): dialog_glade = gtk.glade.XML(deluge.common.get_glade_file("dgtkpopups.glade")) speed_dialog = dialog_glade.get_widget("speed_dialog") + spin_title = dialog_glade.get_widget("spin_title") + spin_title.set_text(_("Desired Ratio")) spin_speed = dialog_glade.get_widget("spin_speed") spin_speed.set_value(self.get_torrent_desired_ratio()) spin_speed.set_increments(0.1, 1.0) diff --git a/src/interface.py b/src/interface.py index f95cfc95f..d112544af 100644 --- a/src/interface.py +++ b/src/interface.py @@ -220,7 +220,7 @@ class DelugeGTK: def build_menu_radio_list(self, value_list, callback, pref_value=None, suffix=None, show_notset=False, - notset_label=None, notset_lessthan=0): + notset_label=None, notset_lessthan=0, show_other=False): # Build a menu with radio menu items from a list and connect them to the callback # The pref_value is what you would like to test for the default active radio item # Setting show_unlimited will include an Unlimited radio item @@ -269,6 +269,8 @@ class DelugeGTK: if str_bwdown == _("Other..."): dialog_glade = gtk.glade.XML(common.get_glade_file("dgtkpopups.glade")) speed_dialog = dialog_glade.get_widget("speed_dialog") + spin_title = dialog_glade.get_widget("spin_title") + spin_title.set_text(_("Speed:")) spin_speed = dialog_glade.get_widget("spin_speed") spin_speed.set_value(self.config.get("max_download_speed")) spin_speed.select_region(0, -1)