diff options
author | Zach Tibbitts <zach@collegegeek.org> | 2006-12-04 21:28:00 +0000 |
---|---|---|
committer | Zach Tibbitts <zach@collegegeek.org> | 2006-12-04 21:28:00 +0000 |
commit | a292ef1282191f00499a84b70bdb3dda39dad968 (patch) | |
tree | dc68db9c81c6d8b25ad0d454151b016ba4634e2b | |
parent | 388d9620d6130387018c09d4d326385a4d5a0cdb (diff) | |
download | deluge-a292ef1282191f00499a84b70bdb3dda39dad968.tar.gz deluge-a292ef1282191f00499a84b70bdb3dda39dad968.tar.bz2 deluge-a292ef1282191f00499a84b70bdb3dda39dad968.zip |
added preferences dialog
-rwxr-xr-x | delugegtk.py | 8 | ||||
-rw-r--r-- | glade/delugegtk.glade | 502 |
2 files changed, 510 insertions, 0 deletions
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 @@ <signal name="activate" handler="new_torrent"/> <child internal-child="image"> <widget class="GtkImage" id="menu-item-image10"> + <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -875,4 +876,505 @@ </widget> </child> </widget> + <widget class="GtkDialog" id="pref_dialog"> + <property name="border_width">5</property> + <property name="has_separator">False</property> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> + <property name="spacing">2</property> + <child> + <widget class="GtkNotebook" id="notebook1"> + <property name="visible">True</property> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow5"> + <property name="visible">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <widget class="GtkViewport" id="viewport2"> + <property name="visible">True</property> + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <child> + <widget class="GtkExpander" id="expander1"> + <property name="visible">True</property> + <child> + <widget class="GtkTable" id="table3"> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <child> + <widget class="GtkRadioButton" id="radiobutton1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Ask me where to save each download</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkRadioButton" id="radiobutton2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Save all downloads to:</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkFileChooserButton" id="filechooserbutton1"> + <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label16"> + <property name="visible">True</property> + <property name="label" translatable="yes">Save Location</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="expander2"> + <property name="visible">True</property> + <child> + <widget class="GtkTable" id="table4"> + <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">2</property> + <child> + <widget class="GtkCheckButton" id="checkbutton1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Stop seeding torrents when their share ratio reaches:</property> + <property name="draw_indicator">True</property> + </widget> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0.10000000000000001 0 10 0.10000000000000001 10 10</property> + <property name="climb_rate">0.10000000149011612</property> + <property name="digits">2</property> + <property name="snap_to_ticks">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label21"> + <property name="visible">True</property> + <property name="label" translatable="yes">Seeding</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="expander3"> + <property name="visible">True</property> + <child> + <widget class="GtkCheckButton" id="checkbutton2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Use compact storage allocation (Saves space)</property> + <property name="draw_indicator">True</property> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label22"> + <property name="visible">True</property> + <property name="label" translatable="yes">Storage</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">2</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label13"> + <property name="visible">True</property> + <property name="label" translatable="yes">General</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="tab_expand">False</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <child> + <widget class="GtkExpander" id="expander5"> + <property name="visible">True</property> + <child> + <widget class="GtkTable" id="table6"> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">4</property> + <child> + <widget class="GtkButton" id="button6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Test Port</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label28"> + <property name="visible">True</property> + <property name="label" translatable="yes">label</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label27"> + <property name="visible">True</property> + <property name="label" translatable="yes">Active port:</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label26"> + <property name="visible">True</property> + <property name="label" translatable="yes">to:</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label25"> + <property name="visible">True</property> + <property name="label" translatable="yes">Try from:</property> + </widget> + </child> + <child> + <placeholder/> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label24"> + <property name="visible">True</property> + <property name="label" translatable="yes">TCP Port</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="expander4"> + <property name="visible">True</property> + <child> + <widget class="GtkTable" id="table7"> + <property name="visible">True</property> + <property name="n_rows">4</property> + <property name="n_columns">2</property> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton7"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="spinbutton4"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">0 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes">Bandwidth</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="position">1</property> + <property name="tab_expand">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label17"> + <property name="visible">True</property> + <property name="label" translatable="yes">Network</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">1</property> + <property name="tab_expand">False</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkTable" id="table5"> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <child> + <widget class="GtkViewport" id="viewport3"> + <property name="visible">True</property> + <child> + <widget class="GtkTextView" id="textview1"> + <property name="visible">True</property> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkHButtonBox" id="hbuttonbox1"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_SPREAD</property> + <child> + <widget class="GtkButton" id="button1"> + <property name="visible">True</property> + <property name="label" translatable="yes">button</property> + </widget> + </child> + <child> + <widget class="GtkButton" id="button2"> + <property name="visible">True</property> + <property name="label" translatable="yes">button</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="button3"> + <property name="visible">True</property> + <property name="label" translatable="yes">button</property> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> + <child> + <widget class="GtkTreeView" id="treeview1"> + <property name="visible">True</property> + </widget> + <packing> + <property name="bottom_attach">2</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + <property name="tab_expand">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label20"> + <property name="visible">True</property> + <property name="label" translatable="yes">Plugins</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">2</property> + <property name="tab_expand">False</property> + <property name="tab_fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <child> + <widget class="GtkButton" id="button5"> + <property name="visible">True</property> + <property name="label" translatable="yes">gtk-cancel</property> + <property name="use_stock">True</property> + </widget> + </child> + <child> + <widget class="GtkButton" id="button4"> + <property name="visible">True</property> + <property name="label" translatable="yes">gtk-ok</property> + <property name="use_stock">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + </widget> + </child> + </widget> </glade-interface> |