From ca9e9afcbd802185015cbf5d5fb0040055dafd28 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Wed, 30 May 2007 23:33:58 +0000 Subject: [PATCH] enc stuff --- encryption/glade/preferences_dialog.glade | 2 +- encryption/src/core.py | 1 - encryption/src/dialogs.py | 5 +- encryption/src/interface.py | 25 +- glade/delugegtk.glade | 1573 +++++++++++---------- 5 files changed, 814 insertions(+), 792 deletions(-) diff --git a/encryption/glade/preferences_dialog.glade b/encryption/glade/preferences_dialog.glade index b2520ed63..dc76555ab 100644 --- a/encryption/glade/preferences_dialog.glade +++ b/encryption/glade/preferences_dialog.glade @@ -851,7 +851,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/encryption/src/core.py b/encryption/src/core.py index 6fea3089e..e58b41a31 100644 --- a/encryption/src/core.py +++ b/encryption/src/core.py @@ -754,4 +754,3 @@ class Manager: def pe_settings(self, out_enc_policy, in_enc_policy, allowed_enc_level, prefer_rc4): return deluge_core.pe_settings(out_enc_policy, in_enc_policy, allowed_enc_level, prefer_rc4) - diff --git a/encryption/src/dialogs.py b/encryption/src/dialogs.py index 820f42f23..1c4b34c97 100644 --- a/encryption/src/dialogs.py +++ b/encryption/src/dialogs.py @@ -75,8 +75,7 @@ class PreferencesDlg: self.glade.get_widget("chk_level_both").set_active(False) self.glade.get_widget("chk_level_plaintext").set_active(False) - self.glade.get_widget("chk_prefer_rc4").set_active(self.preferences.get("prefer_rc4", bool, default=False)) - + self.glade.get_widget("chk_pref_rc4").set_active(self.preferences.get("pref_rc4", bool, default=True)) self.glade.get_widget("chk_use_tray").set_active(self.preferences.get("enable_system_tray", bool, default=True)) self.glade.get_widget("chk_min_on_close").set_active(self.preferences.get("close_to_tray", bool, default=False)) self.glade.get_widget("chk_lock_tray").set_active(self.preferences.get("lock_tray", bool, default=False)) @@ -116,7 +115,7 @@ class PreferencesDlg: self.preferences.set("level_plaintext", self.glade.get_widget("chk_level_plaintext").get_active()) self.preferences.set("level_rc4", self.glade.get_widget("chk_level_rc4").get_active()) self.preferences.set("level_both", self.glade.get_widget("chk_level_both").get_active()) - self.preferences.set("prefer_rc4", self.glade.get_widget("chk_prefer_rc4").get_active()) + self.preferences.set("pref_rc4", self.glade.get_widget("chk_pref_rc4").get_active()) self.preferences.set("system_tray", self.glade.get_widget("chk_use_tray").get_active()) self.preferences.set("close_to_tray", self.glade.get_widget("chk_min_on_close").get_active()) self.preferences.set("lock_tray", self.glade.get_widget("chk_lock_tray").get_active()) diff --git a/encryption/src/interface.py b/encryption/src/interface.py index ccef5b39a..1541d58f9 100644 --- a/encryption/src/interface.py +++ b/encryption/src/interface.py @@ -39,7 +39,7 @@ DEFAULT_PREFS = { "level_plaintext" : False, "level_both" : True, "level_rc4" : False, - "prefer_rc4" : False, + "pref_rc4" : True, "auto_end_seeding" : False, "close_to_tray" : False, "lock_tray" : False, @@ -157,6 +157,29 @@ class DelugeGTK: except KeyError: pass self.apply_prefs() + if(self.config.get("encout_disabled", str, default="False") == "True"): + out_policy = "0" + elif(self.config.get("encout_enabled", str, default="True")): + out_policy = "1" + elif(self.config.get("encout_forced", str, default="False") == "True"): + out_policy = "2" + if(self.config.get("encin_disabled", str, default="False") == "True"): + in_policy = "0" + elif(self.config.get("encin_enabled", str, default="True") == "True"): + in_policy = "1" + elif(self.config.get("encin_forced", str, default="False") == "True"): + in_policy = "2" + if(self.config.get("level_plaintext", str, default="False") == "True"): + level_policy = "0" + elif(self.config.get("level_both", str, default="True") == "True"): + level_policy = "1" + elif(self.config.get("level_rc4", str, default="False") == "True"): + level_policy = "2" + if(self.config.get("pref_rc4", str, default="True") == "True"): + prefrc4 = "1" + elif(self.config.get("pref_rc4", str, default="True") == "False"): + prefrc4 = "0" + self.manager.pe_settings(out_policy, in_policy, level_policy, prefrc4) self.load_window_geometry() def external_add_torrent(self, torrent_file): diff --git a/glade/delugegtk.glade b/glade/delugegtk.glade index c12727e72..fa23e1135 100644 --- a/glade/delugegtk.glade +++ b/glade/delugegtk.glade @@ -14,164 +14,673 @@ 4 3 - + True - False - + True - Add Torrent - Add Torrent - True - gtk-add - + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + True + True + False + + + - False + False + False - + + 300 True - Remove Torrent - Remove Torrent - True - gtk-remove - + True + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + + + True + 10 + 12 + 4 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <b>Progress:</b> + True + + + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <b>Name:</b> + True + + + GTK_FILL + + + + + True + + + 1 + 2 + 1 + 2 + + + + + + 4 + 2 + + + + + True + 0 + + + 3 + 4 + 11 + 12 + + + + + True + 0 + <b>ETA:</b> + True + + + 2 + 3 + 11 + 12 + + + + + True + 0 + + + 3 + 4 + 5 + 6 + + + + + True + 0 + + + 1 + 2 + 5 + 6 + + + + + True + 0 + <b>Peers:</b> + True + + + 2 + 3 + 5 + 6 + + + + + True + 0 + <b>Seeders:</b> + True + + + 5 + 6 + + + + + True + 0 + <b>Total Size:</b> + True + + + 2 + 3 + + + + + True + 0 + <b>Total Downloaded:</b> + True + + + 3 + 4 + + + + + True + 0 + <b>Downloaded this session:</b> + True + + + 7 + 8 + + + + + True + 0 + + + 1 + 2 + 2 + 3 + + + + + True + 0 + + + 1 + 2 + 3 + 4 + + + + + True + 0 + + + 1 + 2 + 7 + 8 + + + + + True + 0 + <b>Tracker:</b> + True + + + 8 + 9 + + + + + True + 0 + <b>Tracker Response:</b> + True + + + 9 + 10 + + + + + True + 0 + <b>Tracker Status:</b> + True + + + 10 + 11 + + + + + True + 0 + + + 1 + 2 + 10 + 11 + + + + + True + 0 + <b>Next Announce:</b> + True + + + 2 + 3 + 10 + 11 + + + + + True + 0 + + + 3 + 4 + 10 + 11 + + + + + True + 0 + <b>Pieces:</b> + True + + + 2 + 3 + 2 + 3 + + + + + True + 0 + <b>Total Uploaded:</b> + True + + + 2 + 3 + 3 + 4 + + + + + True + 0 + + + 3 + 4 + 2 + 3 + + + + + True + 0 + + + 3 + 4 + 3 + 4 + + + + + True + 0 + <b>Share Ratio:</b> + True + + + 2 + 3 + 6 + 7 + + + + + True + 0 + <b>Uploaded This Session:</b> + True + + + 2 + 3 + 7 + 8 + + + + + True + 0 + + + 3 + 4 + 6 + 7 + + + + + True + 0 + + + 3 + 4 + 7 + 8 + + + + + True + 0 + + + 1 + 4 + 8 + 9 + + + + + True + 0 + + + 1 + 4 + 9 + 10 + + + + + True + 0 + <b>Use compact allocation:</b> + True + + + 11 + 12 + + + + + True + 0 + + + 1 + 2 + 11 + 12 + + + + + True + 0 + <b>Download Rate:</b> + True + + + 4 + 5 + + + + + True + 0 + + + 1 + 2 + 4 + 5 + + + + + True + 0 + <b>Upload Rate:</b> + True + + + 2 + 3 + 4 + 5 + + + + + True + 0 + + + 3 + 4 + 4 + 5 + + + + + + + + + False + + + + + True + Details + + + tab + False + False + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + + + + + 1 + False + + + + + True + Peers + + + tab + 1 + False + False + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + + + + + 2 + False + + + + + True + Files + + + tab + 2 + False + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + False + + + + + 3 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Log + + + tab + 3 + False + False + + - False - - - - - True - Clear Finished Torrents - Clear Finished - True - gtk-clear - - - - False - - - - - True - - - False - False - - - - - True - Start / Pause - Start - True - gtk-media-play - - - - False - - - - - True - Queue Torrent Up - Move Up - True - gtk-go-up - - - - False - - - - - True - Queue Torrent Down - Move Down - True - gtk-go-down - - - - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - False - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Preferences - gtk-preferences - - - - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Plugins - gtk-disconnect - - - - False + False + False - 1 - 2 - - GTK_FILL - - - - - True - GTK_TOOLBAR_BOTH_HORIZ - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - GTK_TOOLBAR_BOTH_HORIZ - False - - - 2 3 - 1 - 2 - - GTK_FILL + 2 + 3 + + + + + True + + + 3 + 3 + 4 + @@ -434,672 +943,164 @@ - + True + GTK_TOOLBAR_BOTH_HORIZ + False + 2 3 - 3 - 4 - + 1 + 2 + + GTK_FILL - + True + GTK_TOOLBAR_BOTH_HORIZ + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + False - + True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - True - True - False - - - + Add Torrent + Add Torrent + True + gtk-add + - False - False + False - - 300 + True - True - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - - - True - 10 - 12 - 4 - - - - - - - - - True - 0 - - - 3 - 4 - 4 - 5 - - - - - True - 0 - <b>Upload Rate:</b> - True - - - 2 - 3 - 4 - 5 - - - - - True - 0 - - - 1 - 2 - 4 - 5 - - - - - True - 0 - <b>Download Rate:</b> - True - - - 4 - 5 - - - - - True - 0 - - - 1 - 2 - 11 - 12 - - - - - True - 0 - <b>Use compact allocation:</b> - True - - - 11 - 12 - - - - - True - 0 - - - 1 - 4 - 9 - 10 - - - - - True - 0 - - - 1 - 4 - 8 - 9 - - - - - True - 0 - - - 3 - 4 - 7 - 8 - - - - - True - 0 - - - 3 - 4 - 6 - 7 - - - - - True - 0 - <b>Uploaded This Session:</b> - True - - - 2 - 3 - 7 - 8 - - - - - True - 0 - <b>Share Ratio:</b> - True - - - 2 - 3 - 6 - 7 - - - - - True - 0 - - - 3 - 4 - 3 - 4 - - - - - True - 0 - - - 3 - 4 - 2 - 3 - - - - - True - 0 - <b>Total Uploaded:</b> - True - - - 2 - 3 - 3 - 4 - - - - - True - 0 - <b>Pieces:</b> - True - - - 2 - 3 - 2 - 3 - - - - - True - 0 - - - 3 - 4 - 10 - 11 - - - - - True - 0 - <b>Next Announce:</b> - True - - - 2 - 3 - 10 - 11 - - - - - True - 0 - - - 1 - 2 - 10 - 11 - - - - - True - 0 - <b>Tracker Status:</b> - True - - - 10 - 11 - - - - - True - 0 - <b>Tracker Response:</b> - True - - - 9 - 10 - - - - - True - 0 - <b>Tracker:</b> - True - - - 8 - 9 - - - - - True - 0 - - - 1 - 2 - 7 - 8 - - - - - True - 0 - - - 1 - 2 - 3 - 4 - - - - - True - 0 - - - 1 - 2 - 2 - 3 - - - - - True - 0 - <b>Downloaded this session:</b> - True - - - 7 - 8 - - - - - True - 0 - <b>Total Downloaded:</b> - True - - - 3 - 4 - - - - - True - 0 - <b>Total Size:</b> - True - - - 2 - 3 - - - - - True - 0 - <b>Seeders:</b> - True - - - 5 - 6 - - - - - True - 0 - <b>Peers:</b> - True - - - 2 - 3 - 5 - 6 - - - - - True - 0 - - - 1 - 2 - 5 - 6 - - - - - True - 0 - - - 3 - 4 - 5 - 6 - - - - - True - 0 - <b>ETA:</b> - True - - - 2 - 3 - 11 - 12 - - - - - True - - - 3 - 4 - 11 - 12 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - 2 - - - True - - - 1 - 2 - 1 - 2 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <b>Name:</b> - True - - - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <b>Progress:</b> - True - - - 1 - 2 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - - - - - 4 - 2 - - - - - - - - - False - - - - - True - Details - - - tab - False - False - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - - - - - 1 - False - - - - - True - Peers - - - tab - 1 - False - False - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - - - - - 2 - False - - - - - True - Files - - - tab - 2 - False - False - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - False - - - - - 3 - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Log - - - tab - 3 - False - False - - + Remove Torrent + Remove Torrent + True + gtk-remove + - False - False + False + + + + + True + Clear Finished Torrents + Clear Finished + True + gtk-clear + + + + False + + + + + True + + + False + False + + + + + True + Start / Pause + Start + True + gtk-media-play + + + + False + + + + + True + Queue Torrent Up + Move Up + True + gtk-go-up + + + + False + + + + + True + Queue Torrent Down + Move Down + True + gtk-go-down + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + False + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Preferences + gtk-preferences + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Plugins + gtk-disconnect + + + + False - 3 - 2 - 3 + 1 + 2 + + GTK_FILL