new proxy redone
This commit is contained in:
parent
65f1f32771
commit
fcbc3b48b4
|
@ -799,8 +799,8 @@ class Manager:
|
|||
def add_range_to_ip_filter(self, start, end):
|
||||
return deluge_core.add_range_to_IP_filter(start, end)
|
||||
|
||||
def proxy_settings(self, server, login, paswd, portnum, proxytype):
|
||||
return deluge_core.proxy_settings(server, login, paswd, portnum, proxytype)
|
||||
def proxy_settings(self, server, login, paswd, portnum, proxytype, peerproxy, webseedproxy, trackerproxy, dhtproxy):
|
||||
return deluge_core.proxy_settings(server, login, paswd, portnum, proxytype, peerproxy, webseedproxy, trackerproxy, dhtproxy)
|
||||
|
||||
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)
|
||||
|
|
|
@ -54,6 +54,10 @@ class PreferencesDlg:
|
|||
self.glade.get_widget("combo_enclevel").set_active(self.preferences.get("enclevel_type"))
|
||||
self.glade.get_widget("combo_proxy_type").set_active(self.preferences.get("proxy_type"))
|
||||
self.glade.get_widget("chk_pref_rc4").set_active(self.preferences.get("pref_rc4"))
|
||||
self.glade.get_widget("chk_peer_proxy").set_active(self.preferences.get("peer_proxy"))
|
||||
self.glade.get_widget("chk_web_seed_proxy").set_active(self.preferences.get("web_seed_proxy"))
|
||||
self.glade.get_widget("chk_tracker_proxy").set_active(self.preferences.get("tracker_proxy"))
|
||||
self.glade.get_widget("chk_dht_proxy").set_active(self.preferences.get("dht_proxy"))
|
||||
self.glade.get_widget("chk_upnp").set_active(self.preferences.get("use_upnp"))
|
||||
self.glade.get_widget("chk_natpmp").set_active(self.preferences.get("use_natpmp"))
|
||||
self.glade.get_widget("chk_utpex").set_active(self.preferences.get("use_utpex"))
|
||||
|
@ -99,6 +103,10 @@ class PreferencesDlg:
|
|||
self.preferences.set("enclevel_type", self.glade.get_widget("combo_enclevel").get_active())
|
||||
self.preferences.set("proxy_type", self.glade.get_widget("combo_proxy_type").get_active())
|
||||
self.preferences.set("pref_rc4", self.glade.get_widget("chk_pref_rc4").get_active())
|
||||
self.preferences.set("peer_proxy", self.glade.get_widget("chk_peer_proxy").get_active())
|
||||
self.preferences.set("web_seed_proxy", self.glade.get_widget("chk_web_seed_proxy").get_active())
|
||||
self.preferences.set("tracker_proxy", self.glade.get_widget("chk_tracker_proxy").get_active())
|
||||
self.preferences.set("dht_proxy", self.glade.get_widget("chk_dht_proxy").get_active())
|
||||
self.preferences.set("use_upnp", self.glade.get_widget("chk_upnp").get_active())
|
||||
self.preferences.set("use_natpmp", self.glade.get_widget("chk_natpmp").get_active())
|
||||
self.preferences.set("use_utpex", self.glade.get_widget("chk_utpex").get_active())
|
||||
|
|
|
@ -723,7 +723,7 @@ class DelugeGTK:
|
|||
# Apply the preferences in the core
|
||||
self.manager.apply_prefs()
|
||||
self.manager.pe_settings(self.config.get("encout_state"), self.config.get("encin_state"), self.config.get("enclevel_type"), self.config.get("pref_rc4"))
|
||||
self.manager.proxy_settings(self.config.get("proxy_hostname"), self.config.get("proxy_username"), self.config.get("proxy_password"), int(self.config.get("proxy_port")), self.config.get("proxy_type"))
|
||||
self.manager.proxy_settings(self.config.get("proxy_hostname"), self.config.get("proxy_username"), self.config.get("proxy_password"), int(self.config.get("proxy_port")), self.config.get("proxy_type"), self.config.get("peer_proxy"), self.config.get("web_seed_proxy"), self.config.get("tracker_proxy"), self.config.get("dht_proxy"))
|
||||
|
||||
def get_message_from_state(self, torrent_state):
|
||||
state = torrent_state['state']
|
||||
|
@ -1273,14 +1273,14 @@ class DelugeGTK:
|
|||
def load_window_settings(self):
|
||||
self.wtree.get_widget("chk_infopane").set_active(self.config.get("show_infopane"))
|
||||
self.wtree.get_widget("chk_toolbar").set_active(self.config.get("show_toolbar"))
|
||||
self.wtree.get_widget("chk_size").set_active(self.config.get("show_size",))
|
||||
self.wtree.get_widget("chk_size").set_active(self.config.get("show_size"))
|
||||
self.wtree.get_widget("chk_status").set_active(self.config.get("show_status"))
|
||||
self.wtree.get_widget("chk_seed").set_active(self.config.get("show_seeders",))
|
||||
self.wtree.get_widget("chk_peer").set_active(self.config.get("show_peers",))
|
||||
self.wtree.get_widget("chk_download").set_active(self.config.get("show_dl",))
|
||||
self.wtree.get_widget("chk_upload").set_active(self.config.get("show_ul",))
|
||||
self.wtree.get_widget("chk_eta").set_active(self.config.get("show_eta",))
|
||||
self.wtree.get_widget("chk_ratio").set_active(self.config.get("show_share",))
|
||||
self.wtree.get_widget("chk_seed").set_active(self.config.get("show_seeders"))
|
||||
self.wtree.get_widget("chk_peer").set_active(self.config.get("show_peers"))
|
||||
self.wtree.get_widget("chk_download").set_active(self.config.get("show_dl"))
|
||||
self.wtree.get_widget("chk_upload").set_active(self.config.get("show_ul"))
|
||||
self.wtree.get_widget("chk_eta").set_active(self.config.get("show_eta"))
|
||||
self.wtree.get_widget("chk_ratio").set_active(self.config.get("show_share"))
|
||||
self.wtree.get_widget("vpaned1").set_position(self.config.get("window_height") - self.config.get("window_pane_position"))
|
||||
|
||||
def save_window_settings(self):
|
||||
|
@ -1353,5 +1353,3 @@ class DelugeGTK:
|
|||
if __name__ == "__main__":
|
||||
interface = DelugeGTK()
|
||||
interface.start()
|
||||
|
||||
|
||||
|
|
|
@ -57,11 +57,15 @@ DEFAULT_PREFS = {
|
|||
"max_download_rate_bps": -1.0,
|
||||
"max_number_downloads" : -1.0,
|
||||
"max_number_uploads" : -1.0,
|
||||
"max_upload_rate" : -1.0,
|
||||
"max_upload_rate_bps" : -1,
|
||||
"max_upload_rate" : -1,
|
||||
"max_upload_rate_bps" : -1.0,
|
||||
"max_uploads" : 2,
|
||||
"pref_rc4" : True,
|
||||
"proxy_type" : common.ProxyType.none,
|
||||
"peer_proxy" : False,
|
||||
"web_seed_proxy" : False,
|
||||
"tracker_proxy" : False,
|
||||
"dht_proxy" : False,
|
||||
"proxy_hostname" : "",
|
||||
"proxy_username" : "",
|
||||
"proxy_password" : "",
|
||||
|
|
Loading…
Reference in New Issue