From 43ea807a9bc35132541e90247b263b085a7a709f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Tue, 12 Jun 2007 23:23:05 +0000 Subject: [PATCH] Reverted the preferences state saving because it was silly. Did some touch-ups on the Preferences dialog. --- glade/preferences_dialog.glade | 236 +++++++++++++++++++-------------- src/dialogs.py | 13 -- src/pref.py | 4 - 3 files changed, 134 insertions(+), 119 deletions(-) diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index db8031c13..f6ca91a15 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -7,6 +7,8 @@ 5 Deluge Preferences GTK_WIN_POS_CENTER_ON_PARENT + 550 + True GDK_WINDOW_TYPE_HINT_DIALOG True True @@ -105,6 +107,7 @@ False + False 2 @@ -208,6 +211,7 @@ False + False 2 2 @@ -305,100 +309,16 @@ 2 12 - + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 4 + 2 - + True - True - - - True - 0 - Maximum Connections: - - - - - True - True - The maximum number of connections allowed. Set -1 for unlimited. - -1 -1 1000 1 10 10 - 1 - - - False - False - 1 - - - - - - - True - True - - - True - 0 - Upload Slots: - - - - - True - True - The maximum number of upload slots. Set -1 for unlimited. - -1 -1 1000 1 10 10 - 1 - - - False - False - 1 - - - - - 1 - - - - - True - True - - - True - 0 - Maximum Download Rate (KB/s): - - - - - 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 9000 1 10 10 - 1 - - - False - False - 1 - - - - - 2 - - - - - True - True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 True @@ -406,23 +326,133 @@ Maximum Upload Rate (KB/s): + + + 3 + 4 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 - + True - True - The maximum upload rate for all torrents. Set -1 for unlimited. - -1 -1 9000 1 10 10 - 1 + 0 + Maximum Download Rate (KB/s): - - False - False - 1 - - 3 + 2 + 3 + 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 + 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 @@ -442,6 +472,8 @@ False + False + 2 4 diff --git a/src/dialogs.py b/src/dialogs.py index 49f78459a..af09676bb 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -43,7 +43,6 @@ class PreferencesDlg: 'tray_toggle': self.tray_toggle, 'on_btn_testport_clicked': self.TestPort, }) - self.dialog.connect("configure-event", self.window_configure_event) self.parent = parent self.preferences = preferences @@ -78,11 +77,6 @@ class PreferencesDlg: 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)) - # Load geometry settings for window - self.dialog.resize(self.preferences.get("pref_window_width"), self.preferences.get("pref_window_height")) - if self.preferences.get("pref_window_x_pos") > 0 or self.preferences.get("pref_window_y_pos") > 0: - self.dialog.move(self.preferences.get("pref_window_x_pos"), self.preferences.get("pref_window_y_pos")) - except KeyError: pass # Now, show the dialog @@ -126,13 +120,6 @@ class PreferencesDlg: else: self.glade.get_widget("chk_min_on_close").set_sensitive(False) - def window_configure_event(self, widget, event): - self.preferences.set("pref_window_x_pos", event.x) - self.preferences.set("pref_window_y_pos", event.y) - self.preferences.set("pref_window_width", event.width) - self.preferences.set("pref_window_height", event.height) - - class PluginDlg: def __init__(self, parent, plugins): diff --git a/src/pref.py b/src/pref.py index 90cbbdb38..b37bd7075 100644 --- a/src/pref.py +++ b/src/pref.py @@ -63,10 +63,6 @@ DEFAULT_PREFS = { "max_upload_rate_bps" : -1.0, "max_uploads" : 2, "pref_rc4" : True, - "pref_window_height" : 550, - "pref_window_width" : 1, - "pref_window_x_pos" : -1, - "pref_window_y_pos" : -1, "queue_seeds_to_bottom" : False, "show_dl" : True, "show_eta" : True,