From bad3ea64d2fa91cd66c859ec48f69a4c255650dc Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 22 Jun 2007 03:21:19 +0000 Subject: [PATCH] remove web seed proxy --- glade/preferences_dialog.glade | 336 ++++++++++++++++----------------- setup.py | 4 +- src/core.py | 4 +- src/deluge_core.cpp | 8 +- src/dialogs.py | 2 - src/interface.py | 2 +- src/pref.py | 1 - 7 files changed, 168 insertions(+), 189 deletions(-) diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index eca91f776..f57f89d57 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -317,108 +317,24 @@ 4 2 - + True - True - The maximum upload rate for all torrents. Set -1 for unlimited. - 1 - -1 -1 9000 1 10 10 - 1 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 + + + True + 0 + Maximum Upload Rate (KiB/s): + + - 1 - 2 3 4 GTK_FILL - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - The maximum download rate for all torrents. Set -1 for unlimited. - 1 - -1 -1 9000 1 10 10 - 1 - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - True - True - The maximum number of upload slots. Set -1 for unlimited. - 1 - -1 -1 1000 1 10 10 - 1 - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - True - The maximum number of connections allowed. Set -1 for unlimited. - 1 - -1 -1 1000 1 10 10 - 1 - - - 1 - 2 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - - - True - 0 - Maximum Connections: - - - - - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - - - True - 0 - Upload Slots: - - - - - 1 - 2 - GTK_FILL - - True @@ -439,19 +355,103 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 - + True 0 - Maximum Upload Rate (KiB/s): + Upload Slots: + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 + + + True + 0 + Maximum Connections: + + + + + GTK_FILL + + + + + True + True + The maximum number of connections allowed. Set -1 for unlimited. + 1 + -1 -1 1000 1 10 10 + 1 + + + 1 + 2 + GTK_FILL + + + + + True + True + The maximum number of upload slots. Set -1 for unlimited. + 1 + -1 -1 1000 1 10 10 + 1 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + The maximum download rate for all torrents. Set -1 for unlimited. + 1 + -1 -1 9000 1 10 10 + 1 + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + True + The maximum upload rate for all torrents. Set -1 for unlimited. + 1 + -1 -1 9000 1 10 10 + 1 + + + 1 + 2 3 4 GTK_FILL @@ -1011,20 +1011,6 @@ Full Stream 2 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Affects only web seeds - Web Seed Proxy - 0 - True - - - 3 - - @@ -1040,34 +1026,81 @@ Full Stream - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Proxy type - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Username + 8080 0 10000 1 10 10 + 3 + 4 1 2 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Password + 3 + 4 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Port + + + 2 + 3 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Server + + + 2 + 3 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 2 3 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 1 + 2 + + True @@ -1085,80 +1118,33 @@ HTTP W/ Auth - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Password - 1 - 2 - 1 - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 1 - 2 2 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Server + Username - 2 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Port - - - 2 - 3 1 2 - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Proxy type - - 3 - 4 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 8080 0 10000 1 10 10 - - - 3 - 4 - 1 - 2 - diff --git a/setup.py b/setup.py index 70fb35bd0..49363f9fb 100644 --- a/setup.py +++ b/setup.py @@ -144,8 +144,8 @@ if boosttype == "nomt": 'boost_thread', 'z', 'pthread', 'ssl'] print 'Libraries nomt' elif boosttype == "mt": - librariestype = ['boost_filesystem-mt', 'boost_date_time-mt', - 'boost_thread-mt', 'z', 'pthread', 'ssl'] + librariestype = ['boost_filesystem', 'boost_date_time', + 'boost_thread', 'z', 'pthread', 'ssl'] print 'Libraries mt' deluge_core = Extension('deluge_core', diff --git a/src/core.py b/src/core.py index 8a294be0f..d285f441c 100644 --- a/src/core.py +++ b/src/core.py @@ -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, peerproxy, webseedproxy, trackerproxy, dhtproxy): - return deluge_core.proxy_settings(server, login, paswd, portnum, proxytype, peerproxy, webseedproxy, trackerproxy, dhtproxy) + def proxy_settings(self, server, login, paswd, portnum, proxytype, peerproxy, trackerproxy, dhtproxy): + return deluge_core.proxy_settings(server, login, paswd, portnum, proxytype, peerproxy, 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) diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index f5c5fa709..0543644c4 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -1311,9 +1311,9 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args) char *server, *login, *pasw; int portnum; libtorrent::proxy_settings::proxy_type proxytype; - bool peerproxy, webseedproxy, trackerproxy, dhtproxy; + bool peerproxy, trackerproxy, dhtproxy; - PyArg_ParseTuple(args, "sssiibbbb", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &webseedproxy, &trackerproxy, &dhtproxy); + PyArg_ParseTuple(args, "sssiibbb", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &trackerproxy, &dhtproxy); M_proxy_settings->type = proxytype; M_proxy_settings->username = login; @@ -1325,10 +1325,6 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args) M_ses->set_peer_proxy(*M_proxy_settings); } - if (webseedproxy) { - M_ses->set_web_seed_proxy(*M_proxy_settings); - } - if (trackerproxy) { M_ses->set_tracker_proxy(*M_proxy_settings); } diff --git a/src/dialogs.py b/src/dialogs.py index 1d895868e..12e108f94 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -55,7 +55,6 @@ class PreferencesDlg: 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")) @@ -104,7 +103,6 @@ class PreferencesDlg: 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()) diff --git a/src/interface.py b/src/interface.py index 936c44e52..58ac6016d 100644 --- a/src/interface.py +++ b/src/interface.py @@ -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.config.get("peer_proxy"), self.config.get("web_seed_proxy"), self.config.get("tracker_proxy"), self.config.get("dht_proxy")) + 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("tracker_proxy"), self.config.get("dht_proxy")) def get_message_from_state(self, torrent_state): state = torrent_state['state'] diff --git a/src/pref.py b/src/pref.py index 89bc2e675..39fe7f047 100644 --- a/src/pref.py +++ b/src/pref.py @@ -64,7 +64,6 @@ DEFAULT_PREFS = { "pref_rc4" : True, "proxy_type" : common.ProxyType.none, "peer_proxy" : False, - "web_seed_proxy" : False, "tracker_proxy" : False, "dht_proxy" : False, "proxy_hostname" : "",