summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2008-11-22 09:00:01 +0000
committerAndrew Resch <andrewresch@gmail.com>2008-11-22 09:00:01 +0000
commit342ddbe4ad830cabf7880168790a2ce29966ef1f (patch)
tree82c3251df2737ffe4507175d51800d256c07ff2e
parent9601ca2f86ace0de8dc2fa6d275b15f7b24fe525 (diff)
downloaddeluge-342ddbe4ad830cabf7880168790a2ce29966ef1f.tar.gz
deluge-342ddbe4ad830cabf7880168790a2ce29966ef1f.tar.bz2
deluge-342ddbe4ad830cabf7880168790a2ce29966ef1f.zip
Add an option to not include IP overhead in rate limiting (setting False
is equivalent to how 0.5.x behaves)
-rw-r--r--ChangeLog2
-rw-r--r--deluge/core/core.py14
-rw-r--r--deluge/ui/gtkui/glade/preferences_dialog.glade369
-rw-r--r--deluge/ui/gtkui/preferences.py6
-rwxr-xr-xlibtorrent/bindings/python/src/session_settings.cpp11
5 files changed, 218 insertions, 184 deletions
diff --git a/ChangeLog b/ChangeLog
index 8886da969..0c88937f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
Deluge 1.0.6 (In Development)
Core:
* Fix #475 catch unicode decoding errors
+ * Add an option to not include IP overhead in rate limiting (this is equivalent
+ to how 0.5.x behaves)
GtkUI:
* Display the proper downloaded value in the statistics tab
diff --git a/deluge/core/core.py b/deluge/core/core.py
index 1f6990bcc..b614d2a6c 100644
--- a/deluge/core/core.py
+++ b/deluge/core/core.py
@@ -116,6 +116,7 @@ DEFAULT_PREFS = {
"move_completed": False,
"move_completed_path": deluge.common.get_default_download_dir(),
"new_release_check": True,
+ "rate_limit_ip_overhead": True
}
class Core(
@@ -292,6 +293,8 @@ class Core(
self.new_release_timer = None
self.config.register_set_function("new_release_check",
self._on_new_release_check)
+ self.config.register_set_function("rate_limit_ip_overhead",
+ self._on_rate_limit_ip_overhead)
self.config.register_change_callback(self._on_config_value_change)
# Start the AlertManager
@@ -476,7 +479,8 @@ class Core(
# Build the status dictionary
try:
status = self.torrents[torrent_id].get_status(keys)
- except KeyError:
+ except KeyError, e:
+ log.debug(e)
# The torrent_id is not found in the torrentmanager, so return None
return None
@@ -493,7 +497,8 @@ class Core(
for torrent_id in torrent_ids:
try:
status = self.torrents[torrent_id].get_status(keys)
- except KeyError:
+ except KeyError, e:
+ log.debug(e)
return None
# Get the leftover fields and ask the plugin manager to fill them
leftover_fields = list(set(keys) - set(status.keys()))
@@ -949,3 +954,8 @@ class Core(
else:
if self.new_release_timer:
gobject.source.remove(self.new_release_timer)
+
+ def _on_rate_limit_ip_overhead(self, key, value):
+ log.debug("%s: %s", key, value)
+ self.settings.rate_limit_ip_overhead = value
+ self.session.set_settings(self.settings)
diff --git a/deluge/ui/gtkui/glade/preferences_dialog.glade b/deluge/ui/gtkui/glade/preferences_dialog.glade
index 39ae92cae..0abba9c34 100644
--- a/deluge/ui/gtkui/glade/preferences_dialog.glade
+++ b/deluge/ui/gtkui/glade/preferences_dialog.glade
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Mon Oct 6 22:13:51 2008 -->
+<!--Generated with glade3 3.4.5 on Sat Nov 22 00:50:04 2008 -->
<glade-interface>
<widget class="GtkDialog" id="pref_dialog">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -1166,185 +1166,185 @@ Disabled</property>
<property name="n_columns">2</property>
<property name="column_spacing">15</property>
<child>
- <widget class="GtkSpinButton" id="spin_max_upload_slots_global">
+ <widget class="GtkSpinButton" id="spin_max_connections_per_second">
<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="snap_to_ticks">True</property>
+ <property name="adjustment">-1 -1 9999 1 10 10</property>
<property name="numeric">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_max_upload">
+ <widget class="GtkSpinButton" id="spin_max_half_open_connections">
<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="digits">1</property>
+ <property name="adjustment">-1 -1 9999 1 10 10</property>
<property name="numeric">True</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="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_max_download">
+ <widget class="GtkLabel" id="label58">
<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>
- <property name="digits">1</property>
- <property name="numeric">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Maximum Connection Attempts per Second:</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="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label14">
+ <widget class="GtkLabel" id="label57">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">The maximum download speed for all torrents. Set -1 for unlimited.</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Maximum Download Speed (KiB/s):</property>
+ <property name="label" translatable="yes">Maximum Half-Open Connections:</property>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</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_max_connections_global">
+ <widget class="GtkLabel" id="label17">
<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="max_length">4</property>
- <property name="xalign">1</property>
- <property name="adjustment">-1 -1 9000 1 10 10</property>
- <property name="climb_rate">1</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_IF_VALID</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>
<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="label15">
+ <widget class="GtkLabel" id="label16">
<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 connections allowed. Set -1 for unlimited.</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Maximum Upload Slots:</property>
+ <property name="label" translatable="yes">Maximum Connections:</property>
</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="GtkLabel" id="label16">
+ <widget class="GtkLabel" id="label15">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</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 Connections:</property>
+ <property name="label" translatable="yes">Maximum Upload Slots:</property>
</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="GtkLabel" id="label17">
+ <widget class="GtkSpinButton" id="spin_max_connections_global">
<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>
+ <property name="can_focus">True</property>
+ <property name="tooltip" translatable="yes">The maximum number of connections allowed. Set -1 for unlimited.</property>
+ <property name="max_length">4</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">-1 -1 9000 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_IF_VALID</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label57">
+ <widget class="GtkLabel" id="label14">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">The maximum download speed for all torrents. Set -1 for unlimited.</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Maximum Half-Open Connections:</property>
+ <property name="label" translatable="yes">Maximum Download Speed (KiB/s):</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</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="GtkLabel" id="label58">
+ <widget class="GtkSpinButton" id="spin_max_download">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Maximum Connection Attempts per Second:</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>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</widget>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</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>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_max_half_open_connections">
+ <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 9999 1 10 10</property>
+ <property name="adjustment">-1 -1 9000 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
<property name="numeric">True</property>
</widget>
<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">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_max_connections_per_second">
+ <widget class="GtkSpinButton" id="spin_max_upload_slots_global">
<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 9999 1 10 10</property>
+ <property name="adjustment">-1 -1 9000 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
<property name="numeric">True</property>
</widget>
<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">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
@@ -1369,6 +1369,26 @@ Disabled</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkAlignment" id="alignment29">
+ <property name="visible">True</property>
+ <property name="left_padding">5</property>
+ <child>
+ <widget class="GtkCheckButton" id="chk_rate_limit_ip_overhead">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip" translatable="yes">If checked, the estimated TCP/IP overhead is drained from the rate limiters, to avoid exceeding the limits with the total traffic</property>
+ <property name="label" translatable="yes">Rate limit IP overhead</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
@@ -1412,123 +1432,123 @@ Disabled</property>
<property name="n_columns">2</property>
<property name="column_spacing">15</property>
<child>
- <widget class="GtkSpinButton" id="spin_max_upload_per_torrent">
+ <widget class="GtkSpinButton" id="spin_max_upload_slots_per_torrent">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="tooltip" translatable="yes">The maximum number of connections per torrent. Set -1 for unlimited.</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 9000 1 10 10</property>
- <property name="digits">1</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
<property name="numeric">True</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="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_per_torrent">
+ <widget class="GtkSpinButton" id="spin_max_connections_per_torrent">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum number of connections per torrent. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 9000 1 10 10</property>
- <property name="digits">1</property>
+ <property name="snap_to_ticks">True</property>
<property name="numeric">True</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="GtkLabel" id="label32">
+ <widget class="GtkLabel" id="label18">
<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="xalign">0</property>
- <property name="label" translatable="yes">Maximum Upload Speed (KiB/s):</property>
+ <property name="label" translatable="yes">Maximum Connections:</property>
</widget>
<packing>
- <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="label31">
+ <widget class="GtkLabel" id="label24">
<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="xalign">0</property>
- <property name="label" translatable="yes">Maximum Download Speed (KiB/s):</property>
+ <property name="label" translatable="yes">Maximum Upload Slots:</property>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</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="GtkLabel" id="label24">
+ <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="xalign">0</property>
- <property name="label" translatable="yes">Maximum Upload Slots:</property>
+ <property name="label" translatable="yes">Maximum Download Speed (KiB/s):</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_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="GtkLabel" id="label18">
+ <widget class="GtkLabel" id="label32">
<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="xalign">0</property>
- <property name="label" translatable="yes">Maximum Connections:</property>
+ <property name="label" translatable="yes">Maximum Upload Speed (KiB/s):</property>
</widget>
<packing>
+ <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_connections_per_torrent">
+ <widget class="GtkSpinButton" id="spin_max_download_per_torrent">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip" translatable="yes">The maximum number of connections per torrent. Set -1 for unlimited.</property>
<property name="xalign">1</property>
<property name="adjustment">-1 -1 9000 1 10 10</property>
- <property name="snap_to_ticks">True</property>
+ <property name="digits">1</property>
<property name="numeric">True</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_slots_per_torrent">
+ <widget class="GtkSpinButton" id="spin_max_upload_per_torrent">
<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="tooltip" translatable="yes">The maximum number of connections per torrent. 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="snap_to_ticks">True</property>
+ <property name="digits">1</property>
<property name="numeric">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
@@ -2343,20 +2363,23 @@ Disabled</property>
<property name="n_columns">2</property>
<property name="column_spacing">10</property>
<child>
- <widget class="GtkLabel" id="label42">
+ <widget class="GtkSpinButton" id="spin_active">
<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="xalign">0</property>
- <property name="label" translatable="yes">Total active downloading:</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">0 -1 9999 1 10 10</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options"></property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_downloading">
+ <widget class="GtkSpinButton" id="spin_seeding">
<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>
@@ -2368,36 +2391,36 @@ Disabled</property>
<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="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label48">
+ <widget class="GtkLabel" id="label27">
<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="xalign">0</property>
- <property name="label" translatable="yes">Total active:</property>
+ <property name="label" translatable="yes">Total active seeding:</property>
</widget>
<packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label27">
+ <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="xalign">0</property>
- <property name="label" translatable="yes">Total active seeding:</property>
+ <property name="label" translatable="yes">Total active:</property>
</widget>
<packing>
- <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_seeding">
+ <widget class="GtkSpinButton" id="spin_downloading">
<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>
@@ -2409,25 +2432,22 @@ Disabled</property>
<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="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_active">
+ <widget class="GtkLabel" id="label42">
<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="xalign">1</property>
- <property name="adjustment">0 -1 9999 1 10 10</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Total active downloading:</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
</widget>
@@ -2490,36 +2510,37 @@ Disabled</property>
<property name="n_columns">2</property>
<property name="column_spacing">10</property>
<child>
- <widget class="GtkSpinButton" id="spin_seed_time_limit">
+ <widget class="GtkLabel" id="label53">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="width_chars">6</property>
- <property name="xalign">1</property>
- <property name="adjustment">6 -1 100 1 10 10</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Share Ratio Limit:</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"></property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_seed_time_ratio_limit">
+ <widget class="GtkLabel" id="label54">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="width_chars">6</property>
- <property name="xalign">1</property>
- <property name="adjustment">6 -1 100 0.10000000000000001 10 10</property>
- <property name="digits">2</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Seed Time Ratio:</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"></property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label55">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Seed Time (m):</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -2538,37 +2559,36 @@ Disabled</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label55">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Seed Time (m):</property>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label54">
+ <widget class="GtkSpinButton" id="spin_seed_time_ratio_limit">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Seed Time Ratio:</property>
+ <property name="can_focus">True</property>
+ <property name="width_chars">6</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">6 -1 100 0.10000000000000001 10 10</property>
+ <property name="digits">2</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>
+ <property name="x_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label53">
+ <widget class="GtkSpinButton" id="spin_seed_time_limit">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Share Ratio Limit:</property>
+ <property name="can_focus">True</property>
+ <property name="width_chars">6</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">6 -1 100 1 10 10</property>
</widget>
<packing>
- <property name="x_options">GTK_FILL</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>
+ <property name="x_options"></property>
</packing>
</child>
</widget>
@@ -2731,7 +2751,6 @@ Disabled</property>
<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="headers_clickable">True</property>
</widget>
<packing>
<property name="resize">False</property>
diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py
index 19d54b05f..96ec1beb9 100644
--- a/deluge/ui/gtkui/preferences.py
+++ b/deluge/ui/gtkui/preferences.py
@@ -239,6 +239,8 @@ class Preferences(component.Component):
("value", self.core_config["max_connections_per_second"]),
"chk_ignore_limits_on_local_network": \
("active", self.core_config["ignore_limits_on_local_network"]),
+ "chk_rate_limit_ip_overhead": \
+ ("active", self.core_config["rate_limit_ip_overhead"]),
"spin_max_connections_per_torrent": \
("value", self.core_config["max_connections_per_torrent"]),
"spin_max_upload_slots_per_torrent": \
@@ -359,6 +361,7 @@ class Preferences(component.Component):
"spin_max_half_open_connections",
"spin_max_connections_per_second",
"chk_ignore_limits_on_local_network",
+ "chk_rate_limit_ip_overhead",
"spin_max_connections_per_torrent",
"spin_max_upload_slots_per_torrent",
"spin_max_download_per_torrent",
@@ -532,6 +535,8 @@ class Preferences(component.Component):
"spin_max_download_per_torrent").get_value()
new_core_config["ignore_limits_on_local_network"] = \
self.glade.get_widget("chk_ignore_limits_on_local_network").get_active()
+ new_core_config["rate_limit_ip_overhead"] = \
+ self.glade.get_widget("chk_rate_limit_ip_overhead").get_active()
## Interface tab ##
new_gtkui_config["enable_system_tray"] = \
@@ -706,4 +711,3 @@ class Preferences(component.Component):
def on_plugin_selection_changed(self, treeselection):
log.debug("on_plugin_selection_changed")
-
diff --git a/libtorrent/bindings/python/src/session_settings.cpp b/libtorrent/bindings/python/src/session_settings.cpp
index 3f2a7b632..76e078560 100755
--- a/libtorrent/bindings/python/src/session_settings.cpp
+++ b/libtorrent/bindings/python/src/session_settings.cpp
@@ -44,11 +44,12 @@ void bind_session_settings()
.def_readwrite("seed_time_limit", &session_settings::seed_time_limit)
.def_readwrite("auto_scraped_interval", &session_settings::auto_scrape_interval)
.def_readwrite("peer_tos", &session_settings::peer_tos)
+ .def_readwrite("rate_limit_ip_overhead", &session_settings::rate_limit_ip_overhead)
#ifndef TORRENT_DISABLE_DHT
.def_readwrite("use_dht_as_fallback", &session_settings::use_dht_as_fallback)
#endif
;
-
+
enum_<proxy_settings::proxy_type>("proxy_type")
.value("none", proxy_settings::none)
.value("socks4", proxy_settings::socks4)
@@ -57,7 +58,7 @@ void bind_session_settings()
.value("http", proxy_settings::http)
.value("http_pw", proxy_settings::http_pw)
;
- class_<proxy_settings>("proxy_settings")
+ class_<proxy_settings>("proxy_settings")
.def_readwrite("hostname", &proxy_settings::hostname)
.def_readwrite("port", &proxy_settings::port)
.def_readwrite("password", &proxy_settings::password)
@@ -71,11 +72,11 @@ void bind_session_settings()
.value("enabled", pe_settings::enabled)
.value("disabled", pe_settings::disabled)
;
-
+
enum_<pe_settings::enc_level>("enc_level")
.value("rc4", pe_settings::rc4)
.value("plaintext", pe_settings::plaintext)
- .value("both", pe_settings::both)
+ .value("both", pe_settings::both)
;
class_<pe_settings>("pe_settings")
@@ -87,5 +88,3 @@ void bind_session_settings()
#endif
}
-
-