From d889759b5d7ef67328b274263218ed15a0699d10 Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Thu, 22 Mar 2007 19:39:32 +0000 Subject: [PATCH] New preferences dlg --- glade/plugin_dialog.glade | 115 ++++ glade/preferences_dialog.glade | 946 +++++++++++++++++++++++++++++++++ setup.py | 2 +- src/delugegtk.py | 11 +- 4 files changed, 1067 insertions(+), 7 deletions(-) create mode 100644 glade/plugin_dialog.glade create mode 100644 glade/preferences_dialog.glade diff --git a/glade/plugin_dialog.glade b/glade/plugin_dialog.glade new file mode 100644 index 000000000..48360b956 --- /dev/null +++ b/glade/plugin_dialog.glade @@ -0,0 +1,115 @@ + + + + + + 480 + 5 + Plugin Manager + 583 + 431 + True + GDK_WINDOW_TYPE_HINT_NORMAL + True + True + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + 2 + + + True + False + + + True + True + + + True + + + + + True + + + True + False + GTK_WRAP_WORD + False + + + 10 + + + + + True + GTK_BUTTONBOX_SPREAD + + + True + False + gtk-preferences + True + + + + + + False + 1 + + + + + 10 + 1 + + + + + False + + + + + True + Plugins + + + tab + False + False + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + GTK_BUTTONBOX_END + + + True + gtk-close + True + + + + + False + GTK_PACK_END + + + + + + diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade new file mode 100644 index 000000000..7421ce378 --- /dev/null +++ b/glade/preferences_dialog.glade @@ -0,0 +1,946 @@ + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Deluge Preferences + GTK_WIN_POS_CENTER_ON_PARENT + 500 + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + 2 + 2 + + + True + Ask me where to save each download + True + + + 2 + + + + + True + Save all downloads to: + True + radio_ask_save + + + 1 + 2 + + + + + True + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + + + 1 + 2 + 1 + 2 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Download Location</b> + True + + + label_item + + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Maximum simultaneous active torrents: + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 + 0 0 100 1 10 10 + True + GTK_UPDATE_IF_VALID + + + 1 + 2 + + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Torrents</b> + True + + + label_item + + + + + False + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + Use compact storage allocation + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Compact Allocation</b> + True + + + label_item + + + + + False + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + 2 + 2 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Queue torrents to bottom when they begin seeding + True + + + 2 + + + + + True + Stop seeding torrents when their share ratio reaches: + True + + + 1 + 2 + + + + + True + True + 5 + 0.5 + 0 0 10 0.050000000000000003 10 9 + 2 + True + + + 1 + 2 + 1 + 2 + + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Seeding</b> + True + + + label_item + + + + + False + 3 + + + + + + + + + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Downloads + + + tab + False + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Warning - Changes to these settings will only be applied the next time Deluge is restarted</b> + True + GTK_JUSTIFY_CENTER + True + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + 2 + 4 + + + + + + True + Test Port + + + 3 + 4 + 1 + 2 + + + + + True + 0000 + + + 2 + 3 + 1 + 2 + + + + + True + Active port: + + + 1 + 2 + 1 + 2 + + + + + True + True + 0.5 + 0 0 65535 1 10 10 + + + 3 + 4 + + + + + True + True + 0.5 + 0 0 65535 1 10 10 + + + 1 + 2 + + + + + True + to: + + + 2 + 3 + + + + + True + Try from: + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>TCP Port</b> + True + + + label_item + + + + + False + 1 + + + + + + + + + + + + 1 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Network + + + tab + 1 + False + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + 5 + 3 + + + True + + + 2 + 3 + 2 + 3 + + + + + True + + + 2 + 3 + 1 + 2 + + + + + True + KB/s + + + 2 + 3 + 4 + 5 + + + + + + True + True + 10 + 1 + 0 -1 1024 1 10 10 + + + 1 + 2 + 4 + 5 + + + + + + True + 0 + Maximum Upload Rate: + + + 4 + 5 + + + + + True + True + 10 + 1 + 0 -1 100 1 10 10 + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + Maximum Connections + + + 1 + 2 + + + + + True + 0 + Upload Slots + + + 2 + 3 + + + + + True + 0 + Maximum Download Rate: + + + 3 + 4 + + + + + True + True + 10 + 1 + 0 -1 100 1 10 10 + + + 1 + 2 + 2 + 3 + + + + + + True + True + 10 + 1 + 0 -1 2048 1 10 10 + + + 1 + 2 + 3 + 4 + + + + + + True + KB/s + + + 2 + 3 + 3 + 4 + + + + + + True + <i>(-1 is unlimited)</i> + True + + + 3 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Bandwidth Usage</b> + True + + + label_item + + + + + False + + + + + + + + + + + + + + + 2 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Bandwidth + + + tab + 2 + False + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + 2 + 2 + + + True + Minimize to tray on close + True + + + 2 + 1 + 2 + 12 + + + + + True + Enable system tray icon + True + True + + + 2 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>System Tray</b> + True + + + label_item + + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 + 3 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GUI update interval + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + 0.5 0.5 5 0.5 0.5 1 + 1 + True + + + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + seconds + + + 2 + 3 + + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Performance</b> + True + + + label_item + + + + + False + 1 + + + + + + + + + + + + 3 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Other + + + tab + 3 + False + False + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_BUTTONBOX_END + + + True + gtk-cancel + True + + + + + True + gtk-ok + True + 1 + + + 1 + + + + + False + GTK_PACK_END + + + + + + diff --git a/setup.py b/setup.py index d9c408498..70397f42f 100644 --- a/setup.py +++ b/setup.py @@ -259,4 +259,4 @@ setup(name=NAME, fullname=FULLNAME, version=VERSION, ext_package='deluge', ext_modules=[deluge_core, upnp], cmdclass=cmdclass - ) +) diff --git a/src/delugegtk.py b/src/delugegtk.py index 0f4cc0b8f..30e5749d4 100644 --- a/src/delugegtk.py +++ b/src/delugegtk.py @@ -235,13 +235,14 @@ class DelugeGTK: dcommon.get_pixmap("deluge-about.png"))) def build_pref_dialog(self): - self.prf_glade = gtk.glade.XML(dcommon.get_glade_file("dgtkpref.glade"), domain='deluge') + self.prf_glade = gtk.glade.XML(dcommon.get_glade_file("preferences_dialog.glade"), domain='deluge') + self.plg_glade = gtk.glade.XML(dcommon.get_glade_file("plugin_dialog.glade"), domain='deluge') self.prf = self.prf_glade.get_widget("pref_dialog") self.prf.set_icon_from_file(dcommon.get_pixmap("deluge32.png")) self.prf_glade.signal_autoconnect({"tray_toggle": self.tray_toggle,}) - self.plugin_dlg = self.prf_glade.get_widget("plugin_dialog") + self.plugin_dlg = self.plg_glade.get_widget("plugin_dialog") self.plugin_dlg.set_icon_from_file(dcommon.get_pixmap("deluge32.png")) - self.plugin_view = self.prf_glade.get_widget("plugin_view") + self.plugin_view = self.plg_glade.get_widget("plugin_view") self.plugin_store = gtk.ListStore(str, bool) self.plugin_view.set_model(self.plugin_store) try: @@ -514,9 +515,7 @@ class DelugeGTK: str, default=os.path.expandvars('$HOME'))) self.prf_glade.get_widget("chk_autoseed").set_active(self.config.get("auto_end_seeding", bool, default=False)) self.prf_glade.get_widget("ratio_spinner").set_value(self.config.get("end_seed_ratio", float, default=0.0)) - # self.prf_glade.get_widget("chk_compact").set_active(self.config.get("use_compact_storage", bool, default=False)) - self.prf_glade.get_widget("chk_compact").set_active(False) - self.prf_glade.get_widget("chk_compact").set_sensitive(False) + self.prf_glade.get_widget("chk_compact").set_active(self.config.get("use_compact_storage", bool, default=False)) # Page 2 self.prf_glade.get_widget("active_port_label").set_text(str(self.manager.get_state()['port'])) self.prf_glade.get_widget("spin_port_min").set_value(self.config.get("tcp_port_range_lower", int, default=6881))