diff --git a/delugegtk.py b/delugegtk.py
index f4b0e37ea..54eb5beca 100755
--- a/delugegtk.py
+++ b/delugegtk.py
@@ -26,6 +26,7 @@ class DelugeGTK:
## File Menu
"new_torrent": self.new_torrent,
"add_torrent": self.add_torrent,
+ "pref_clicked": self.show_preferences_dialog,
## Help Menu
"show_about_dialog": self.show_about_dialog,
}
@@ -40,6 +41,8 @@ class DelugeGTK:
self.abt.set_icon_from_file(dcommon.get_pixmap("deluge32.png"))
self.abt.set_logo(gtk.gdk.pixbuf_new_from_file(
dcommon.get_pixmap("deluge256.png")))
+ ## Create the preferences dialog
+ self.prf = self.wtree.get_widget("pref_dialog")
@@ -54,6 +57,11 @@ class DelugeGTK:
self.abt.run()
self.abt.hide_all()
+ def show_preferences_dialog(self, obj):
+ self.prf.show_all()
+ self.prf.run()
+ self.prf.hide_all()
+
if __name__ == "__main__":
dgtk = DelugeGTK()
diff --git a/glade/delugegtk.glade b/glade/delugegtk.glade
index ce09bf270..44890240f 100644
--- a/glade/delugegtk.glade
+++ b/glade/delugegtk.glade
@@ -142,6 +142,7 @@
+
+ 5
+ 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
+
+
+ True
+ GTK_POLICY_AUTOMATIC
+ GTK_POLICY_AUTOMATIC
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+ 2
+ 2
+
+
+ True
+ Ask me where to save each download
+ True
+
+
+ 2
+
+
+
+
+ True
+ Save all downloads to:
+ True
+
+
+ 1
+ 2
+
+
+
+
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
+ True
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+
+
+ True
+ Save Location
+
+
+ label_item
+
+
+
+
+ False
+
+
+
+
+ True
+
+
+ True
+ 1
+ 2
+
+
+ True
+ Stop seeding torrents when their share ratio reaches:
+ True
+
+
+
+
+ True
+ True
+ 0.10000000000000001 0 10 0.10000000000000001 10 10
+ 0.10000000149011612
+ 2
+ True
+
+
+ 1
+ 2
+
+
+
+
+
+
+ True
+ Seeding
+
+
+ label_item
+
+
+
+
+ False
+ 1
+
+
+
+
+ True
+
+
+ True
+ Use compact storage allocation (Saves space)
+ True
+
+
+
+
+ True
+ Storage
+
+
+ label_item
+
+
+
+
+ False
+ 2
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+ True
+ General
+
+
+ tab
+ False
+ False
+
+
+
+
+ True
+
+
+ True
+
+
+ True
+ 2
+ 4
+
+
+ True
+ Test Port
+
+
+ 3
+ 4
+ 1
+ 2
+
+
+
+
+ True
+ label
+
+
+ 2
+ 3
+ 1
+ 2
+
+
+
+
+ True
+ Active port:
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+ True
+ True
+ 0 0 100 1 10 10
+
+
+ 3
+ 4
+
+
+
+
+ True
+ True
+ 0 0 100 1 10 10
+
+
+ 1
+ 2
+
+
+
+
+ True
+ to:
+
+
+ 2
+ 3
+
+
+
+
+ True
+ Try from:
+
+
+
+
+
+
+
+
+
+ True
+ TCP Port
+
+
+ label_item
+
+
+
+
+ False
+
+
+
+
+ True
+
+
+ True
+ 4
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 0 0 100 1 10 10
+
+
+ 1
+ 2
+
+
+
+
+ True
+ True
+ 0 0 100 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+ True
+ True
+ 0 0 100 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+ True
+ True
+ 0 0 100 1 10 10
+
+
+ 1
+ 2
+ 3
+ 4
+
+
+
+
+
+
+ True
+ Bandwidth
+
+
+ label_item
+
+
+
+
+ False
+ 1
+
+
+
+
+
+
+
+ 1
+ False
+
+
+
+
+ True
+ Network
+
+
+ tab
+ 1
+ False
+ False
+
+
+
+
+ True
+ 2
+ 2
+
+
+ True
+
+
+ True
+
+
+
+
+ 1
+ 2
+
+
+
+
+ True
+ GTK_BUTTONBOX_SPREAD
+
+
+ True
+ button
+
+
+
+
+ True
+ button
+
+
+ 1
+
+
+
+
+ True
+ button
+
+
+ 2
+
+
+
+
+ 1
+ 2
+ 1
+ 2
+ GTK_FILL
+ GTK_FILL
+
+
+
+
+ True
+
+
+ 2
+
+
+
+
+ 2
+ False
+
+
+
+
+ True
+ Plugins
+
+
+ tab
+ 2
+ 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-cancel
+ True
+
+
+
+
+ True
+ gtk-ok
+ True
+
+
+ 1
+
+
+
+
+ False
+ GTK_PACK_END
+
+
+
+
+