From 477278961b8ebfd376e1325bd3109da3f508d727 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 14 Jun 2007 15:59:02 +0000 Subject: [PATCH] remove dht limit pref --- glade/preferences_dialog.glade | 178 ++++++++++++++------------------- src/dialogs.py | 2 - src/pref.py | 1 - 3 files changed, 75 insertions(+), 106 deletions(-) diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index f6ca91a15..fc8815df5 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -315,40 +315,86 @@ 4 2 - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - - - True - 0 - Maximum Upload Rate (KB/s): - - + 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 - + + 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 Download Rate (KB/s): + Maximum Connections: - 2 - 3 GTK_FILL @@ -372,84 +418,38 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 - + True 0 - Maximum Connections: + Maximum Download Rate (KB/s): - 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 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 + + + True + 0 + Maximum Upload Rate (KB/s): + + - 1 - 2 3 4 GTK_FILL @@ -715,35 +715,7 @@ - - True - - - True - 23 - Max number of DHT connections: - - - False - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 0 500 1 10 10 - 1 - - - False - 1 - - - - - 1 - + diff --git a/src/dialogs.py b/src/dialogs.py index ce2b0c2ca..594c5c7c2 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -76,7 +76,6 @@ class PreferencesDlg: self.glade.get_widget("chk_autoseed").set_active(self.preferences.get("auto_end_seeding", bool, default=False)) self.glade.get_widget("ratio_spinner").set_value(self.preferences.get("auto_seed_ratio", int, default=-1)) self.glade.get_widget("chk_dht").set_active(self.preferences.get("enable_dht", bool, default=True)) - self.glade.get_widget("spin_dht").set_value(self.preferences.get("dht_connections", int, default=80)) self.glade.get_widget("spin_gui").set_value(self.preferences.get("gui_update_interval", float, default=1.0)) except KeyError: @@ -110,7 +109,6 @@ class PreferencesDlg: self.preferences.set("auto_end_seeding", self.glade.get_widget("chk_autoseed").get_active()) self.preferences.set("auto_seed_ratio", self.glade.get_widget("ratio_spinner").get_value()) self.preferences.set("enable_dht", self.glade.get_widget("chk_dht").get_active()) - self.preferences.set("dht_connections", self.glade.get_widget("spin_dht").get_value()) self.preferences.set("gui_update_interval", self.glade.get_widget("spin_gui").get_value()) def TestPort(self, widget): diff --git a/src/pref.py b/src/pref.py index b90244df7..00ae1680e 100644 --- a/src/pref.py +++ b/src/pref.py @@ -41,7 +41,6 @@ DEFAULT_PREFS = { "auto_seed_ratio" : 0, "close_to_tray" : False, "default_download_path" : "", - "dht_connections" : 80, "enable_dht" : True, "enable_system_tray" : True, "enabled_plugins" : "",