diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2008-02-13 04:45:31 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2008-02-13 04:45:31 +0000 |
commit | 1c08462dd345eba3b2e6794940612ce5177518d7 (patch) | |
tree | cec3da766bf5f549abedab543cc28f4290c27362 | |
parent | 6b716c782def58d1a41cf08b8af3569f5613fd02 (diff) | |
download | deluge-1c08462dd345eba3b2e6794940612ce5177518d7.tar.gz deluge-1c08462dd345eba3b2e6794940612ce5177518d7.tar.bz2 deluge-1c08462dd345eba3b2e6794940612ce5177518d7.zip |
add time limits for seeding torrents
-rw-r--r-- | glade/preferences_dialog.glade | 742 | ||||
-rw-r--r-- | src/core.py | 27 | ||||
-rw-r--r-- | src/dialogs.py | 11 | ||||
-rw-r--r-- | src/pref.py | 6 |
4 files changed, 438 insertions, 348 deletions
diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index 0f3eda151..92d185be8 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -69,24 +69,8 @@ <property name="n_rows">2</property> <property name="n_columns">2</property> <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="xalign">0</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> - <signal name="toggled" handler="toggle_ui"/> - </widget> - </child> - <child> - <widget class="GtkFileChooserButton" id="download_path_button"> + <widget class="GtkFileChooserButton" id="torrent_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> @@ -94,6 +78,8 @@ <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> @@ -109,8 +95,9 @@ </packing> </child> <child> - <widget class="GtkFileChooserButton" id="torrent_path_button"> + <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> @@ -118,10 +105,23 @@ <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="xalign">0</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> + <signal name="toggled" handler="toggle_ui"/> + </widget> + </child> </widget> <packing> <property name="position">1</property> @@ -166,6 +166,17 @@ <property name="n_rows">1</property> <property name="n_columns">2</property> <child> + <widget class="GtkCheckButton" id="chk_autoload"> + <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">Autoload all torrent files in:</property> + <property name="xalign">0</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + </widget> + </child> + <child> <widget class="GtkAlignment" id="alignment36"> <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> @@ -183,17 +194,6 @@ <property name="right_attach">2</property> </packing> </child> - <child> - <widget class="GtkCheckButton" id="chk_autoload"> - <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">Autoload all torrent files in:</property> - <property name="xalign">0</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - </widget> - </child> </widget> </child> </widget> @@ -1095,6 +1095,59 @@ Either</property> <property name="position">3</property> </packing> </child> + <child> + <widget class="GtkHBox" id="hbox19"> + <property name="visible">True</property> + <property name="spacing">10</property> + <child> + <widget class="GtkCheckButton" id="chk_autotime"> + <property name="visible">True</property> + <property name="label" translatable="yes">Stop seeding torrents when their seed time reaches:</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> + <packing> + <property name="expand">False</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="time_spinner"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">Number of hours</property> + <property name="xalign">1</property> + <property name="adjustment">0 0 100 0.050000000745099998 10 9</property> + <property name="climb_rate">1</property> + <property name="digits">2</property> + <property name="snap_to_ticks">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">4</property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="chk_clear_max_time_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 seed time</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="position">5</property> + </packing> + </child> </widget> </child> </widget> @@ -1174,10 +1227,10 @@ Either</property> <property name="n_rows">6</property> <property name="n_columns">2</property> <child> - <widget class="GtkSpinButton" id="spin_max_half_open"> + <widget class="GtkSpinButton" id="spin_connection_speed"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited.</property> + <property name="tooltip" translatable="yes">The maximum number of connection attempts per second. A high value may crash some cheap routers. 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> @@ -1185,101 +1238,74 @@ Either</property> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="x_options">GTK_FILL</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment33"> + <widget class="GtkLabel" id="label43"> <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="label39"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited.</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Maximum Half-Open Connections:</property> - </widget> - </child> + <property name="tooltip" translatable="yes">The maximum number of connection attempts per second. A high value may crash some cheap routers. Set -1 for unlimited.</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Maximum Connection Attempts per Second:</property> </widget> <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">GTK_FILL</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment18"> + <widget class="GtkSpinButton" id="spin_max_upload_slots_global"> <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="label20"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Maximum Upload Slots:</property> - </widget> - </child> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">The maximum upload slots 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> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment14"> + <widget class="GtkSpinButton" id="spin_max_upload"> <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="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Maximum Upload Speed (KiB/s):</property> - </widget> - </child> + <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">0 -1 9000 1 10 10</property> + <property name="climb_rate">1</property> + <property name="digits">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="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_global"> + <widget class="GtkSpinButton" id="spin_max_download"> <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="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 1000 1 10 10</property> + <property name="adjustment">0 -1 9000 1 10 10</property> <property name="climb_rate">1</property> + <property name="digits">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> @@ -1296,76 +1322,103 @@ Either</property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spin_max_download"> + <widget class="GtkSpinButton" id="spin_max_connections_global"> <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="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</property> <property name="xalign">1</property> - <property name="adjustment">0 -1 9000 1 10 10</property> + <property name="adjustment">-1 -1 1000 1 10 10</property> <property name="climb_rate">1</property> - <property name="digits">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_upload"> + <widget class="GtkAlignment" id="alignment4"> <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">0 -1 9000 1 10 10</property> - <property name="climb_rate">1</property> - <property name="digits">1</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="alignment14"> + <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="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</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">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_slots_global"> + <widget class="GtkAlignment" id="alignment18"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">The maximum upload slots 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="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="label20"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">The maximum upload speed for all torrents. Set -1 for unlimited.</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Maximum Upload Slots:</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="GtkLabel" id="label43"> + <widget class="GtkAlignment" id="alignment33"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">The maximum number of connection attempts per second. A high value may crash some cheap routers. Set -1 for unlimited.</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Maximum Connection Attempts per Second:</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="label39"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited.</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Maximum Half-Open Connections:</property> + </widget> + </child> </widget> <packing> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spin_connection_speed"> + <widget class="GtkSpinButton" id="spin_max_half_open"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">The maximum number of connection attempts per second. A high value may crash some cheap routers. Set -1 for unlimited.</property> + <property name="tooltip" translatable="yes">The maximum half-open connections. A high value may crash some cheap routers. 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> @@ -1373,8 +1426,8 @@ Either</property> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="x_options">GTK_FILL</property> </packing> </child> @@ -1419,37 +1472,20 @@ Either</property> <property name="n_rows">2</property> <property name="n_columns">2</property> <child> - <widget class="GtkAlignment" id="alignment21"> - <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> - <child> - <widget class="GtkLabel" id="label31"> - <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="tooltip" translatable="yes">The maximum number of connections per torrent. Set -1 for unlimited.</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Maximum Connections:</property> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkAlignment" id="alignment22"> + <widget class="GtkSpinButton" id="spin_max_upload_slots_per_torrent"> <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> - <child> - <widget class="GtkLabel" id="label33"> - <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="tooltip" translatable="yes">The maximum upload slots per torrent. Set -1 for unlimited.</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Maximum Upload Slots:</property> - </widget> - </child> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">The maximum upload slots per torrent. 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> @@ -1467,22 +1503,39 @@ Either</property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spin_max_upload_slots_per_torrent"> + <widget class="GtkAlignment" id="alignment22"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">The maximum upload slots per torrent. 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> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <widget class="GtkLabel" id="label33"> + <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="tooltip" translatable="yes">The maximum upload slots per torrent. Set -1 for unlimited.</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Maximum Upload Slots:</property> + </widget> + </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> </packing> </child> + <child> + <widget class="GtkAlignment" id="alignment21"> + <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> + <child> + <widget class="GtkLabel" id="label31"> + <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="tooltip" translatable="yes">The maximum number of connections per torrent. Set -1 for unlimited.</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Maximum Connections:</property> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -1591,61 +1644,57 @@ Either</property> <placeholder/> </child> <child> - <widget class="GtkEntry" id="txt_peer_proxy_hostname"> + <widget class="GtkSpinButton" id="spin_peer_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="adjustment">8080 0 65000 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="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> - <child> - <widget class="GtkLabel" id="label5"> + <widget class="GtkLabel" id="label8"> <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="label" translatable="yes">Port</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="label6"> + <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">Password</property> + <property name="label" translatable="yes">Server</property> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> </packing> </child> <child> - <widget class="GtkComboBox" id="combo_peer_proxy_type"> + <widget class="GtkEntry" id="txt_peer_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="items" translatable="yes">None -Socksv4 -Socksv5 -Socksv5 W/ Auth -HTTP -HTTP W/ Auth</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> @@ -1663,57 +1712,61 @@ HTTP W/ Auth</property> </packing> </child> <child> - <widget class="GtkEntry" id="txt_peer_proxy_password"> + <widget class="GtkComboBox" id="combo_peer_proxy_type"> <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> + <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> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label7"> + <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">Server</property> + <property name="label" translatable="yes">Password</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label8"> + <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">Port</property> + <property name="label" translatable="yes">Username</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="GtkSpinButton" id="spin_peer_proxy_port"> + <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> + <child> + <widget class="GtkEntry" id="txt_peer_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> - <property name="adjustment">8080 0 65000 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> </widget> @@ -1786,61 +1839,57 @@ HTTP W/ Auth</property> <placeholder/> </child> <child> - <widget class="GtkEntry" id="txt_tracker_proxy_hostname"> + <widget class="GtkSpinButton" id="spin_tracker_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="adjustment">8080 0 65000 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="label49"> - <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> - <child> - <widget class="GtkLabel" id="label48"> + <widget class="GtkLabel" id="label44"> <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="label" translatable="yes">Port</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="label47"> + <widget class="GtkLabel" id="label45"> <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> + <property name="label" translatable="yes">Server</property> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> </packing> </child> <child> - <widget class="GtkComboBox" id="combo_tracker_proxy_type"> + <widget class="GtkEntry" id="txt_tracker_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="items" translatable="yes">None -Socksv4 -Socksv5 -Socksv5 W/ Auth -HTTP -HTTP W/ Auth</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> @@ -1858,57 +1907,61 @@ HTTP W/ Auth</property> </packing> </child> <child> - <widget class="GtkEntry" id="txt_tracker_proxy_password"> + <widget class="GtkComboBox" id="combo_tracker_proxy_type"> <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> + <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> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label45"> + <widget class="GtkLabel" id="label47"> <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> + <property name="label" translatable="yes">Password</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label44"> + <widget class="GtkLabel" id="label48"> <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">Port</property> + <property name="label" translatable="yes">Username</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="GtkSpinButton" id="spin_tracker_proxy_port"> + <widget class="GtkLabel" id="label49"> + <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> + <child> + <widget class="GtkEntry" id="txt_tracker_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> - <property name="adjustment">8080 0 65000 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> </widget> @@ -1981,61 +2034,57 @@ HTTP W/ Auth</property> <placeholder/> </child> <child> - <widget class="GtkEntry" id="txt_dht_proxy_hostname"> + <widget class="GtkSpinButton" id="spin_dht_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="adjustment">8080 0 65000 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="label65"> - <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> - <child> - <widget class="GtkLabel" id="label64"> + <widget class="GtkLabel" id="label61"> <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="label" translatable="yes">Port</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="label63"> + <widget class="GtkLabel" id="label62"> <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> + <property name="label" translatable="yes">Server</property> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> </packing> </child> <child> - <widget class="GtkComboBox" id="combo_dht_proxy_type"> + <widget class="GtkEntry" id="txt_dht_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="items" translatable="yes">None -Socksv4 -Socksv5 -Socksv5 W/ Auth -HTTP -HTTP W/ Auth</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> @@ -2053,57 +2102,61 @@ HTTP W/ Auth</property> </packing> </child> <child> - <widget class="GtkEntry" id="txt_dht_proxy_password"> + <widget class="GtkComboBox" id="combo_dht_proxy_type"> <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> + <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> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label62"> + <widget class="GtkLabel" id="label63"> <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> + <property name="label" translatable="yes">Password</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label61"> + <widget class="GtkLabel" id="label64"> <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">Port</property> + <property name="label" translatable="yes">Username</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="GtkSpinButton" id="spin_dht_proxy_port"> + <widget class="GtkLabel" id="label65"> + <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> + <child> + <widget class="GtkEntry" id="txt_dht_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> - <property name="adjustment">8080 0 65000 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> </widget> @@ -2176,61 +2229,57 @@ HTTP W/ Auth</property> <placeholder/> </child> <child> - <widget class="GtkEntry" id="txt_web_proxy_hostname"> + <widget class="GtkSpinButton" id="spin_web_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="adjustment">8080 0 65000 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="label71"> - <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> - <child> - <widget class="GtkLabel" id="label70"> + <widget class="GtkLabel" id="label67"> <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="label" translatable="yes">Port</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="label69"> + <widget class="GtkLabel" id="label68"> <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> + <property name="label" translatable="yes">Server</property> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> </packing> </child> <child> - <widget class="GtkComboBox" id="combo_web_proxy_type"> + <widget class="GtkEntry" id="txt_web_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="items" translatable="yes">None -Socksv4 -Socksv5 -Socksv5 W/ Auth -HTTP -HTTP W/ Auth</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> @@ -2248,57 +2297,61 @@ HTTP W/ Auth</property> </packing> </child> <child> - <widget class="GtkEntry" id="txt_web_proxy_password"> + <widget class="GtkComboBox" id="combo_web_proxy_type"> <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> + <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> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label68"> + <widget class="GtkLabel" id="label69"> <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> + <property name="label" translatable="yes">Password</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkLabel" id="label67"> + <widget class="GtkLabel" id="label70"> <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">Port</property> + <property name="label" translatable="yes">Username</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="GtkSpinButton" id="spin_web_proxy_port"> + <widget class="GtkLabel" id="label71"> + <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> + <child> + <widget class="GtkEntry" id="txt_web_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> - <property name="adjustment">8080 0 65000 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> </widget> @@ -2532,34 +2585,27 @@ HTTP W/ Auth</property> <property name="n_rows">2</property> <property name="n_columns">2</property> <child> - <widget class="GtkRadioButton" id="radio_open_folder_custom"> + <widget class="GtkAlignment" id="alignment24"> <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">Custom:</property> - <property name="response_id">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <property name="group">radio_open_folder_stock</property> - <signal name="focus_in_event" handler="on_radio_open_folder_custom_focus_in_event"/> + <property name="left_padding">6</property> + <child> + <widget class="GtkEntry" id="txt_open_folder_location"> + <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> + <signal name="focus_in_event" handler="on_txt_open_folder_location_focus_in_event"/> + </widget> + </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> </packing> </child> <child> - <widget class="GtkRadioButton" id="radio_open_folder_stock"> - <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">Open folder with:</property> - <property name="response_id">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </widget> - </child> - <child> <widget class="GtkAlignment" id="alignment3"> <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> @@ -2581,22 +2627,29 @@ Thunar</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment24"> + <widget class="GtkRadioButton" id="radio_open_folder_stock"> <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="left_padding">6</property> - <child> - <widget class="GtkEntry" id="txt_open_folder_location"> - <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> - <signal name="focus_in_event" handler="on_txt_open_folder_location_focus_in_event"/> - </widget> - </child> + <property name="label" translatable="yes">Open folder with:</property> + <property name="response_id">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </widget> + </child> + <child> + <widget class="GtkRadioButton" id="radio_open_folder_custom"> + <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">Custom:</property> + <property name="response_id">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">radio_open_folder_stock</property> + <signal name="focus_in_event" handler="on_radio_open_folder_custom_focus_in_event"/> </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> @@ -2944,4 +2997,3 @@ information is sent.</property> </child> </widget> </glade-interface> - diff --git a/src/core.py b/src/core.py index 8ce27b4d4..a0ae7efe7 100644 --- a/src/core.py +++ b/src/core.py @@ -75,6 +75,7 @@ PREF_FUNCTIONS = { "max_active_torrents" : None, # no need for a function, applied constantly "max_upload_slots_global" : deluge_core.set_max_upload_slots_global, "auto_seed_ratio" : None, # no need for a function, applied constantly + "auto_seed_time" : None, # no need for a function, applied constantly "max_download_speed_bps" : deluge_core.set_download_rate_limit, "max_upload_speed_bps" : deluge_core.set_upload_rate_limit, "enable_dht" : None, # not a normal pref in that is is applied only on start @@ -171,6 +172,7 @@ class torrent_info: self.desired_ratio = 1.0 self.trackers = "" self.trackers_changed = 0 + self.seed_time = 0 self.delete_me = False # set this to true, to delete it on next sync self.del_data = False # set this to true, to delete data on next sync @@ -653,7 +655,6 @@ Space:") + " " + nice_free) if not self.get_pref('clear_max_ratio_torrents') \ and self.get_pref('auto_seed_ratio') > 0 \ and self.get_pref('auto_end_seeding'): - for unique_ID in self.unique_IDs: torrent_state = self.get_core_torrent_state(unique_ID) if (torrent_state["total_wanted"] - torrent_state["total_wanted_done"] == 0) and not torrent_state['is_paused']: @@ -661,8 +662,20 @@ Space:") + " " + nice_free) if ratio >= self.get_pref('auto_seed_ratio'): self.queue_bottom(unique_ID, enforce_queue=False) # don't recurse! self.set_user_pause(unique_ID, True, enforce_queue=False) + + if not self.get_pref('clear_max_rtime_torrents') \ + and self.get_pref('auto_seed_time') > 0 \ + and self.get_pref('auto_time_end_seeding'): + for unique_ID in self.unique_IDs: + torrent_state = self.get_core_torrent_state(unique_ID) + if (torrent_state["total_wanted"] - torrent_state["total_wanted_done"] == 0) and not torrent_state['is_paused']: + seed_time = self.unique_IDs[unique_ID].seed_time + now = time.time() + if (now - seed_time) >= (self.get_pref('auto_seed_time') * 3600): + self.queue_bottom(unique_ID, enforce_queue=False) # don't recurse! + self.set_user_pause(unique_ID, True, enforce_queue=False) - if self.get_pref('clear_max_ratio_torrents'): + if self.get_pref('clear_max_ratio_torrents') and self.get_pref('auto_end_seeding'): for unique_ID in self.unique_IDs.keys(): torrent_state = self.get_core_torrent_state(unique_ID) if (torrent_state["total_wanted"] - torrent_state["total_wanted_done"] == 0): @@ -670,6 +683,15 @@ Space:") + " " + nice_free) if ratio >= self.get_pref('auto_seed_ratio'): self.removed_unique_ids[unique_ID] = 1 self.remove_torrent(unique_ID, False, True) + if self.get_pref('clear_max_time_torrents') and self.get_pref('auto_time_end_seeding'): + for unique_ID in self.unique_IDs.keys(): + torrent_state = self.get_core_torrent_state(unique_ID) + if (torrent_state["total_wanted"] - torrent_state["total_wanted_done"] == 0): + seed_time = self.unique_IDs[unique_ID].seed_time + now = time.time() + if (now - seed_time) >= (self.get_pref('auto_seed_time') * 3600): + self.removed_unique_ids[unique_ID] = 1 + self.remove_torrent(unique_ID, False, True) # Event handling def connect_event(self, event_type, callback): @@ -721,6 +743,7 @@ Space:") + " " + nice_free) # save fast resume once torrent finishes so as to not recheck # seed if client crashes self.save_fastresume_data(event['unique_ID']) + self.unique_IDs[event['unique_ID']].seed_time = time.time() elif event['event_type'] is self.constants['EVENT_FILE_ERROR']: import gtk diff --git a/src/dialogs.py b/src/dialogs.py index d1e16d6c3..166c4f006 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -150,10 +150,14 @@ class PreferencesDlg: self.glade.get_widget("chk_queue_above_completed").set_sensitive(self.preferences.get("queue_seeds_to_bottom")) self.glade.get_widget("chk_queue_above_completed").set_active(self.preferences.get("queue_above_completed")) self.glade.get_widget("chk_autoseed").set_active(self.preferences.get("auto_end_seeding")) + self.glade.get_widget("chk_autotime").set_active(self.preferences.get("auto_time_end_seeding")) self.glade.get_widget("chk_clear_max_ratio_torrents").set_sensitive(self.preferences.get("auto_end_seeding")) self.glade.get_widget("chk_clear_max_ratio_torrents").set_active(self.preferences.get("clear_max_ratio_torrents")) + self.glade.get_widget("chk_clear_max_time_torrents").set_sensitive(self.preferences.get("auto_time_end_seeding")) + self.glade.get_widget("chk_clear_max_time_torrents").set_active(self.preferences.get("clear_max_time_torrents")) self.glade.get_widget("chk_paused").set_active(self.preferences.get("start_paused")) self.glade.get_widget("ratio_spinner").set_value(self.preferences.get("auto_seed_ratio")) + self.glade.get_widget("time_spinner").set_value(self.preferences.get("auto_seed_time")) self.glade.get_widget("chk_dht").set_active(self.preferences.get("enable_dht")) self.glade.get_widget("chk_use_advanced_bar").set_active(self.preferences.get("use_advanced_bar")) @@ -255,7 +259,8 @@ class PreferencesDlg: self.preferences.set("enable_multi_only", self.glade.get_widget("chk_enable_multi_only").get_active()) self.preferences.set("prioritize_first_last_pieces", self.glade.get_widget("chk_prioritize_first_last_pieces").get_active()) self.preferences.set("auto_end_seeding", self.glade.get_widget("chk_autoseed").get_active()) - self.preferences.set("auto_seed_ratio", self.glade.get_widget("ratio_spinner").get_value()) + self.preferences.set("auto_time_end_seeding", self.glade.get_widget("chk_autotime").get_active()) + self.preferences.set("auto_seed_time", self.glade.get_widget("time_spinner").get_value()) self.preferences.set("use_compact_storage", self.glade.get_widget("radio_compact_allocation").get_active()) self.preferences.set("listen_on", [self.glade.get_widget("spin_port_min").get_value(), self.glade.get_widget("spin_port_max").get_value()]) self.preferences.set("max_upload_speed", self.glade.get_widget("spin_max_upload").get_value()) @@ -274,6 +279,7 @@ class PreferencesDlg: self.preferences.set("queue_seeds_to_bottom", self.glade.get_widget("chk_seedbottom").get_active()) self.preferences.set("enable_dht", self.glade.get_widget("chk_dht").get_active()) self.preferences.set("clear_max_ratio_torrents", self.glade.get_widget("chk_clear_max_ratio_torrents").get_active()) + self.preferences.set("clear_max_time_torrents", self.glade.get_widget("chk_clear_max_time_torrents").get_active()) self.preferences.set("queue_above_completed", self.glade.get_widget("chk_queue_above_completed").get_active()) self.preferences.set("start_paused", self.glade.get_widget("chk_paused").get_active()) self.preferences.set("use_advanced_bar", self.glade.get_widget("chk_use_advanced_bar").get_active()) @@ -341,6 +347,9 @@ class PreferencesDlg: 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_autotime'): + self.glade.get_widget('time_spinner').set_sensitive(value) + self.glade.get_widget('chk_clear_max_time_torrents').set_sensitive(value) elif widget == self.glade.get_widget('chk_seedbottom'): self.glade.get_widget('chk_queue_above_completed').set_sensitive(value) elif widget == self.glade.get_widget('chk_enable_files_dialog'): diff --git a/src/pref.py b/src/pref.py index 251b7f823..98c160c85 100644 --- a/src/pref.py +++ b/src/pref.py @@ -48,12 +48,15 @@ if common.windows_check(): "open_folder_location": "", "send_info" : True, "auto_end_seeding" : False, + "auto_time_end_seeding" : False, "auto_seed_ratio" : 0, + "auto_seed_time" : 0, "close_to_tray" : False, "enable_files_dialog" : False, "enable_multi_only" : True, "queue_above_completed" : False, "clear_max_ratio_torrents" : False, + "clear_max_time_torrents" : False, "default_autoload_path" : os.path.expanduser("~"), "default_torrent_path" : os.path.join(os.path.expanduser("~"), 'deluge', 'torrentfiles'), "default_download_path" : os.path.expanduser("~"), @@ -162,13 +165,16 @@ else: "open_folder_location": "", "send_info" : True, "auto_end_seeding" : False, + "auto_time_end_seeding" : False, "new_releases" : True, "auto_seed_ratio" : 0, + "auto_seed_time" : 0, "close_to_tray" : False, "enable_files_dialog" : False, "enable_multi_only" : True, "queue_above_completed" : False, "clear_max_ratio_torrents" : False, + "clear_max_time_torrents" : False, "default_autoload_path" : os.path.expanduser("~"), "default_torrent_path" : os.path.join(xdg.BaseDirectory.save_config_path('deluge'), 'torrentfiles'), "default_download_path" : os.path.expanduser("~"), |