preliminary smart pref dialog

This commit is contained in:
Zach Tibbitts 2007-07-17 22:29:53 +00:00
parent ce535213b0
commit 7a93e1a0fd
3 changed files with 254 additions and 257 deletions

View File

@ -3,7 +3,7 @@ include README
include README.Packagers
include Makefile
include deluge.desktop
include deluge.xpm
include deluge.png
include msgfmt.py
recursive-include libtorrent/ *
recursive-include glade/ *.glade

View File

@ -55,9 +55,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Ask where to save each download</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_ask_save"/>
</widget>
</child>
<child>
@ -67,15 +65,30 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkFileChooserButton" id="finished_path_button">
<widget class="GtkRadioButton" id="radio_save_all_to">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="title" translatable="yes">Select A Folder</property>
<property name="tooltip" translatable="yes">Store all downloads in:</property>
<property name="label" translatable="yes">Store all downloads in:</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio_ask_save</property>
<signal name="toggled" handler="toggle_ui"/>
</widget>
</child>
<child>
<widget class="GtkCheckButton" id="chk_move_completed">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Move completed downloads to (*same partition only*):</property>
<property name="label" translatable="yes">Move completed downloads to:</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggle_ui"/>
</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>
@ -83,6 +96,7 @@
<child>
<widget class="GtkFileChooserButton" id="download_path_button">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="title" translatable="yes">Select A Folder</property>
@ -93,33 +107,20 @@
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="chk_move_completed">
<widget class="GtkFileChooserButton" id="finished_path_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="sensitive">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Move completed downloads to (*same partition only*):</property>
<property name="label" translatable="yes">Move completed downloads to:</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="title" translatable="yes">Select A Folder</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="GtkRadioButton" id="radio_save_all_to">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Store all downloads in:</property>
<property name="label" translatable="yes">Store all downloads in:</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio_ask_save</property>
</widget>
</child>
</widget>
<packing>
<property name="position">1</property>
@ -202,7 +203,6 @@
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Enable selecting files for torrents before loading</property>
<property name="label" translatable="yes">Enable selecting files for torrents before loading</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
@ -249,7 +249,6 @@
<property name="tooltip" translatable="yes">Compact allocation will only allocate as much storage as it needs to keep the pieces downloaded so far.</property>
<property name="label" translatable="yes">Use compact storage allocation</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
</child>
@ -293,7 +292,6 @@
<property name="can_focus">True</property>
<property name="label" translatable="yes">Queue torrents to bottom when they begin seeding</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_chk_seedbottom"/>
</widget>
@ -301,10 +299,10 @@
<child>
<widget class="GtkCheckButton" id="chk_queue_above_completed">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Queue new torrents above completed ones</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
@ -320,9 +318,8 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Stop seeding torrents when their share ratio reaches:</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_chk_autoseed"/>
<signal name="toggled" handler="toggle_ui"/>
</widget>
<packing>
<property name="expand">False</property>
@ -331,6 +328,7 @@
<child>
<widget class="GtkSpinButton" id="ratio_spinner">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="adjustment">0 0 10 0.050000000745099998 10 9</property>
@ -351,10 +349,10 @@
<child>
<widget class="GtkCheckButton" id="chk_clear_max_ratio_torrents">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Automatically clear torrents that reach the max share ratio</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
@ -401,110 +399,25 @@
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkSpinButton" id="spin_max_upload">
<widget class="GtkAlignment" id="alignment18">
<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</property>
<property name="right_padding">10</property>
<child>
<widget class="GtkLabel" id="label55">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 9000 1 10 10</property>
<property name="climb_rate">1</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Maximum Upload Speed (KiB/s):</property>
</widget>
</child>
</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>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_max_download">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">The maximum download speed for all torrents. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 9000 1 10 10</property>
<property name="climb_rate">1</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>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_num_upload">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum number of upload slots. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 1000 1 10 10</property>
<property name="climb_rate">1</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>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_max_connections">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 1000 1 10 10</property>
<property name="climb_rate">1</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment4">
<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</property>
<property name="right_padding">10</property>
<child>
<widget class="GtkLabel" id="label54">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Maximum Connections:</property>
</widget>
</child>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment5">
<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</property>
<property name="right_padding">10</property>
<child>
<widget class="GtkLabel" id="label53">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">The maximum number of upload slots. Set -1 for unlimited.</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Upload Slots:</property>
</widget>
</child>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment14">
<property name="visible">True</property>
@ -526,20 +439,105 @@
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment18">
<widget class="GtkAlignment" id="alignment5">
<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</property>
<property name="right_padding">10</property>
<child>
<widget class="GtkLabel" id="label55">
<widget class="GtkLabel" id="label53">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</property>
<property name="tooltip" translatable="yes">The maximum number of upload slots. Set -1 for unlimited.</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Maximum Upload Speed (KiB/s):</property>
<property name="label" translatable="yes">Upload Slots:</property>
</widget>
</child>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment4">
<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</property>
<property name="right_padding">10</property>
<child>
<widget class="GtkLabel" id="label54">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Maximum Connections:</property>
</widget>
</child>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_max_connections">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 1000 1 10 10</property>
<property name="climb_rate">1</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_num_upload">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum number of upload slots. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 1000 1 10 10</property>
<property name="climb_rate">1</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>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_max_download">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">The maximum download speed for all torrents. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 9000 1 10 10</property>
<property name="climb_rate">1</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>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_max_upload">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 9000 1 10 10</property>
<property name="climb_rate">1</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>
<property name="x_options">GTK_FILL</property>
@ -744,7 +742,6 @@
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Test Active Port</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_btn_testport_clicked"/>
</widget>
<packing>
@ -800,7 +797,6 @@
<property name="tooltip" translatable="yes">Distributed hash table may improve the amount of active connections.</property>
<property name="label" translatable="yes">Enable Mainline DHT</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
</child>
@ -852,7 +848,6 @@
<property name="tooltip" translatable="yes">Universal Plug and Play</property>
<property name="label" translatable="yes">UPnP</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
@ -867,7 +862,6 @@
<property name="tooltip" translatable="yes">NAT Port Mapping Protocol</property>
<property name="label" translatable="yes">NAT-PMP</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
@ -883,7 +877,6 @@
<property name="tooltip" translatable="yes">µTorrent Peer-Exchange</property>
<property name="label" translatable="yes">µTorrent-PeX</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
@ -991,7 +984,6 @@ Forced</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Prefer to encrypt the entire stream</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
@ -1067,8 +1059,8 @@ Full Stream</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Affects regular bittorrent peers</property>
<property name="label" translatable="yes">Peer Proxy</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggle_ui"/>
</widget>
</child>
<child>
@ -1078,8 +1070,8 @@ Full Stream</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Only affects HTTP tracker connections (UDP tracker connections are affected if the given proxy supports UDP, e.g. SOCKS5).</property>
<property name="label" translatable="yes">Tracker Proxy</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggle_ui"/>
</widget>
<packing>
<property name="position">1</property>
@ -1092,8 +1084,8 @@ Full Stream</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Affects the DHT messages. Since they are sent over UDP, it only has any effect if the proxy supports UDP.</property>
<property name="label" translatable="yes">DHT Proxy</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggle_ui"/>
</widget>
<packing>
<property name="position">2</property>
@ -1114,86 +1106,30 @@ Full Stream</property>
<placeholder/>
</child>
<child>
<widget class="GtkLabel" id="label1">
<widget class="GtkSpinButton" id="spin_proxy_port">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Proxy type</property>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label5">
<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</property>
<property name="label" translatable="yes">Username</property>
<property name="adjustment">8080 0 10000 1 10 10</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="label6">
<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</property>
<property name="label" translatable="yes">Password</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="combo_proxy_type">
<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</property>
<property name="items" translatable="yes">None
Socksv4
Socksv5
Socksv5 W/ Auth
HTTP
HTTP W/ Auth</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="txt_proxy_username">
<widget class="GtkEntry" id="txt_proxy_hostname">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</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="GtkEntry" id="txt_proxy_password">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="visibility">False</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="GtkLabel" id="label7">
<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</property>
<property name="label" translatable="yes">Server</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
</packing>
</child>
<child>
@ -1210,30 +1146,91 @@ HTTP W/ Auth</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="txt_proxy_hostname">
<widget class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Server</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_proxy_port">
<widget class="GtkEntry" id="txt_proxy_password">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">8080 0 10000 1 10 10</property>
<property name="visibility">False</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<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="GtkEntry" id="txt_proxy_username">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</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="GtkComboBox" id="combo_proxy_type">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="items" translatable="yes">None
Socksv4
Socksv5
Socksv5 W/ Auth
HTTP
HTTP W/ Auth</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label6">
<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</property>
<property name="label" translatable="yes">Password</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label5">
<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</property>
<property name="label" translatable="yes">Username</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1">
<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</property>
<property name="label" translatable="yes">Proxy type</property>
</widget>
</child>
</widget>
<packing>
<property name="position">1</property>
@ -1314,10 +1311,9 @@ HTTP W/ Auth</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Enable system tray icon</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_chk_use_tray_toggled"/>
<signal name="toggled" handler="toggle_ui"/>
</widget>
</child>
<child>
@ -1327,9 +1323,9 @@ HTTP W/ Auth</property>
<child>
<widget class="GtkCheckButton" id="chk_min_on_close">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="label" translatable="yes">Minimize to tray on close</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
</child>
@ -1349,11 +1345,12 @@ HTTP W/ Auth</property>
<child>
<widget class="GtkCheckButton" id="chk_lock_tray">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Password protect system tray</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggle_ui"/>
</widget>
</child>
<child>
@ -1378,6 +1375,7 @@ HTTP W/ Auth</property>
<child>
<widget class="GtkEntry" id="txt_tray_passwd">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="visibility">False</property>
@ -1519,7 +1517,6 @@ HTTP W/ Auth</property>
<property name="visible">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
</widget>
</child>
<child>

View File

@ -43,12 +43,7 @@ class PreferencesDlg:
self.dialog = self.glade.get_widget("pref_dialog")
self.dialog.set_icon_from_file(common.get_pixmap("deluge32.png"))
self.glade.signal_autoconnect({
'on_chk_use_tray_toggled': self.tray_toggle,
'on_save_all_to' : self.toggle_move_chk,
'on_ask_save' : self.toggle_move_chk,
'on_chk_seedbottom' : self.toggle_queue_above_completed_chk,
'on_chk_autoseed' : self.toggle_clear_max_ratio_torrents_chk,
'on_btn_testport_clicked': self.TestPort,
'toggle_ui': self.toggle_ui
})
self.preferences = preferences
@ -161,35 +156,40 @@ class PreferencesDlg:
common.open_url_in_browser('http://www.deluge-torrent.org/test-port.php?port=%s' % self.active_port)
def tray_toggle(self, widget):
is_active = widget.get_active()
self.glade.get_widget("chk_min_on_close").set_sensitive(is_active)
self.glade.get_widget("chk_lock_tray").set_sensitive(is_active)
self.glade.get_widget("txt_tray_passwd").set_sensitive(is_active)
def toggle_ui(self, widget):
value = widget.get_active()
print widget.get_name()
if widget == self.glade.get_widget('radio_save_all_to'):
self.glade.get_widget('download_path_button').set_sensitive(value)
self.glade.get_widget('chk_move_completed').set_sensitive(value)
if not value:
self.glade.get_widget('chk_move_completed').set_active(value)
#self.toggle_ui(self.glade.get_widget('chk_move_completed'))
elif widget == self.glade.get_widget('chk_move_completed'):
self.glade.get_widget('finished_path_button').set_sensitive(value)
elif widget == self.glade.get_widget('chk_autoseed'):
self.glade.get_widget('ratio_spinner').set_sensitive(value)
self.glade.get_widget('chk_clear_max_ratio_torrents').set_sensitive(value)
elif widget == self.glade.get_widget('chk_peer_proxy') or \
widget == self.glade.get_widget('chk_tracker_proxy') or \
widget == self.glade.get_widget('chk_dht_proxy'):
value = self.glade.get_widget('chk_peer_proxy').get_active() or self.glade.get_widget('chk_tracker_proxy').get_active() or self.glade.get_widget('chk_dht_proxy').get_active()
for x in ['combo_proxy_type', 'txt_proxy_hostname', 'txt_proxy_username',
'spin_proxy_port', 'txt_proxy_password']:
self.glade.get_widget(x).set_sensitive(value)
elif widget == self.glade.get_widget('chk_use_tray'):
self.glade.get_widget('chk_min_on_close').set_sensitive(value)
self.glade.get_widget('chk_lock_tray').set_sensitive(value)
if not value:
self.glade.get_widget('chk_min_on_close').set_active(value)
self.glade.get_widget('chk_lock_tray').set_active(value)
elif widget == self.glade.get_widget('chk_lock_tray'):
self.glade.get_widget('txt_tray_passwd').set_sensitive(value)
def toggle_clear_max_ratio_torrents_chk(self, widget):
if(self.glade.get_widget("chk_autoseed").get_active()):
self.glade.get_widget("chk_clear_max_ratio_torrents").set_sensitive(True)
else:
self.glade.get_widget("chk_clear_max_ratio_torrents").set_active(False)
self.glade.get_widget("chk_clear_max_ratio_torrents").set_sensitive(False)
def toggle_queue_above_completed_chk(self, widget):
if(self.glade.get_widget("chk_seedbottom").get_active()):
self.glade.get_widget("chk_queue_above_completed").set_sensitive(True)
else:
self.glade.get_widget("chk_queue_above_completed").set_active(False)
self.glade.get_widget("chk_queue_above_completed").set_sensitive(False)
def toggle_move_chk(self, widget):
if(self.glade.get_widget("radio_ask_save").get_active()):
self.glade.get_widget("chk_move_completed").set_active(False)
self.glade.get_widget("chk_move_completed").set_sensitive(False)
self.glade.get_widget("finished_path_button").set_sensitive(False)
else:
self.glade.get_widget("chk_move_completed").set_sensitive(True)
self.glade.get_widget("finished_path_button").set_sensitive(True)
class FilesDlg:
def __init__(self, manager, unique_id):