enc stuff

This commit is contained in:
Marcos Pinto 2007-05-30 23:33:58 +00:00
parent 4f7f4cf5c4
commit ca9e9afcbd
5 changed files with 814 additions and 792 deletions

View File

@ -851,7 +851,7 @@
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkCheckButton" id="chk_prefer_rc4">
<widget class="GtkCheckButton" id="chk_pref_rc4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>

View File

@ -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)

View File

@ -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())

View File

@ -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):

File diff suppressed because it is too large Load Diff