From 879cf1b53c2e12f009b370f7db57e0d89fd7f333 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 15 May 2013 13:51:06 +0100 Subject: [PATCH] change 'classic mode' checkbox for standalone/thinclient radio buttons --- deluge/ui/gtkui/glade/preferences_dialog.ui | 205 +++++++++++--------- deluge/ui/gtkui/preferences.py | 9 +- 2 files changed, 119 insertions(+), 95 deletions(-) diff --git a/deluge/ui/gtkui/glade/preferences_dialog.ui b/deluge/ui/gtkui/glade/preferences_dialog.ui index 5936447b4..baceaff3a 100644 --- a/deluge/ui/gtkui/glade/preferences_dialog.ui +++ b/deluge/ui/gtkui/glade/preferences_dialog.ui @@ -2,59 +2,6 @@ - - 999999 - 100 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 65535 - 1 - 10 - - - 1 - 32000 - 60 - 1 - 10 - 0.5 100 @@ -75,6 +22,19 @@ 1 10 + + 1 + 32000 + 60 + 1 + 10 + + + 999999 + 100 + 1 + 10 + 65535 1 @@ -146,6 +106,46 @@ 1 10 + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + + + 65535 + 1 + 10 + -1 9999 @@ -2341,36 +2341,57 @@ Requires a Hex value. - + True False 0 none - + True False - 2 - 2 - 12 - - Enable + + Standalone False True True False - Classic Mode will hide most of the daemon functionality and will make Deluge appear to be a single application. Use this if you do not want to take advantage of running Deluge as a daemon. You need to restart Deluge for this setting to take effect. + The classic self-contained application + True True + + False + True + 0 + + + + + Thin Client + False + True + True + False + Switch to thinclient mode, enabling connection to a Deluge daemon + True + radio_classic + + + False + True + 7 + 1 + - + True False - Classic Mode + Application Mode @@ -2432,35 +2453,6 @@ Requires a Hex value. 1 - - - False - True - True - False - Besides being experimental, using the pieces bar -will increase the bandwidth used between client -and daemon(does not apply in classic mode). -Use at your own risk if you wish to help us debug -this new feature. - True - - - - True - False - Show a pieces bar in the torrent's -status tab (<b>EXPERIMENTAL!!!</b>) - True - - - - - True - True - 2 - - True @@ -2697,6 +2689,35 @@ status tab (<b>EXPERIMENTAL!!!</b>) 2 + + + False + True + True + False + Besides being experimental, using the pieces bar +will increase the bandwidth used between client +and daemon(does not apply in classic mode). +Use at your own risk if you wish to help us debug +this new feature. + True + + + + True + False + Show a pieces bar in the torrent's +status tab (<b>EXPERIMENTAL!!!</b>) + True + + + + + True + True + 2 + + diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 18db272af..8b7cc5a35 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -556,8 +556,10 @@ class Preferences(component.Component): self.gtkui_config["enable_appindicator"]) self.builder.get_object("chk_lock_tray").set_active( self.gtkui_config["lock_tray"]) - self.builder.get_object("chk_classic_mode").set_active( + self.builder.get_object("radio_classic").set_active( self.gtkui_config["classic_mode"]) + self.builder.get_object("radio_thinclient").set_active( + not self.gtkui_config["classic_mode"]) self.builder.get_object("chk_show_rate_in_title").set_active( self.gtkui_config["show_rate_in_title"]) self.builder.get_object("chk_focus_main_window_on_add").set_active( @@ -745,7 +747,7 @@ class Preferences(component.Component): if passhex != "c07eb5a8c0dc7bb81c217b67f11c3b7a5e95ffd7": new_gtkui_config["tray_password"] = passhex - new_gtkui_in_classic_mode = self.builder.get_object("chk_classic_mode").get_active() + new_gtkui_in_classic_mode = self.builder.get_object("radio_classic").get_active() new_gtkui_config["classic_mode"] = new_gtkui_in_classic_mode new_gtkui_config["show_rate_in_title"] = \ @@ -852,10 +854,11 @@ class Preferences(component.Component): if response == gtk.RESPONSE_NO: # Set each changed config value in the core self.gtkui_config["classic_mode"] = True - self.builder.get_object("chk_classic_mode").set_active(True) + self.builder.get_object("radio_classic").set_active(True) else: client.disconnect() component.stop() + self.builder.get_object("radio_thinclient").set_active(True) dialog = dialogs.YesNoDialog( _("Attention"), _("Your current session will be stopped. Continue?")