summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--glade/delugegtk.glade1803
-rw-r--r--libtorrent/include/libtorrent/kademlia/dht_tracker.hpp7
-rw-r--r--libtorrent/include/libtorrent/kademlia/traversal_algorithm.hpp7
-rwxr-xr-xlibtorrent/src/bt_peer_connection.cpp5
-rw-r--r--libtorrent/src/kademlia/closest_nodes.cpp7
-rw-r--r--libtorrent/src/kademlia/dht_tracker.cpp15
-rw-r--r--libtorrent/src/kademlia/node.cpp17
-rw-r--r--libtorrent/src/kademlia/routing_table.cpp3
-rw-r--r--libtorrent/src/kademlia/traversal_algorithm.cpp17
-rwxr-xr-xlibtorrent/src/peer_connection.cpp1
-rwxr-xr-xlibtorrent/src/session_impl.cpp2
-rw-r--r--setup.py2
-rw-r--r--src/common.py2
14 files changed, 968 insertions, 927 deletions
diff --git a/ChangeLog b/ChangeLog
index e83c3853f..3b5edcaff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,10 @@
-Deluge 0.5.8.7 (xx March 2008)
+Deluge 0.5.8.7 (25 March 2008)
* UPnP fixes
* Bandwidth limiter fix
- * DHT routing table fix
+ * Various DHT fixes
+ * Fix upload ratio not saving
+ * Fix WebUI crash (ticket #89)
+ * Clear seeding torrents now deletes the ".torrent" file
* Fix keyboard scrolling of plugins
* Scheduler can now handle number of active torrents, upload slots and max connections - Ben
diff --git a/glade/delugegtk.glade b/glade/delugegtk.glade
index 5204d6705..9d647443a 100644
--- a/glade/delugegtk.glade
+++ b/glade/delugegtk.glade
@@ -19,162 +19,785 @@
<placeholder/>
</child>
<child>
- <widget class="GtkToolbar" id="tb_left">
+ <widget class="GtkVPaned" id="vpaned1">
<property name="visible">True</property>
- <property name="icon_size">GTK_ICON_SIZE_SMALL_TOOLBAR</property>
- <property name="icon_size_set">True</property>
<child>
- <widget class="GtkToolButton" id="toolbutton_add">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Add Torrent</property>
- <property name="label" translatable="yes">Add</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-add</property>
- <signal name="clicked" handler="add_torrent"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton_remove">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="tooltip" translatable="yes">Remove Torrent</property>
- <property name="label" translatable="yes">Remove</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-remove</property>
- <signal name="clicked" handler="remove_torrent"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton_clear">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Clear Seeding Torrents</property>
- <property name="label" translatable="yes">Clear</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-clear</property>
- <signal name="clicked" handler="clear_finished"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton_resume">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="tooltip" translatable="yes">Start or Resume Torrent</property>
- <property name="label" translatable="yes">Resume</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-media-play</property>
- <signal name="clicked" handler="tor_start"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton_pause">
+ <widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="tooltip" translatable="yes">Pause Torrent</property>
- <property name="label" translatable="yes">Pause</property>
- <property name="stock_id">gtk-media-pause</property>
- <signal name="clicked" handler="tor_pause"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton_up">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="tooltip" translatable="yes">Queue Torrent Up</property>
- <property name="label" translatable="yes">Up</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-go-up</property>
- <signal name="clicked" handler="queue_up"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton_down">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="tooltip" translatable="yes">Queue Torrent Down</property>
- <property name="label" translatable="yes">Down</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-go-down</property>
- <signal name="clicked" handler="queue_down"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSeparatorToolItem" id="separatortoolitem2">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="toolbutton1">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Change Deluge preferences</property>
- <property name="label" translatable="yes">Preferences</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-preferences</property>
- <signal name="clicked" handler="pref_clicked"/>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="torrent_view">
+ <property name="visible">True</property>
+ <property name="headers_clickable">True</property>
+ <property name="reorderable">True</property>
+ <property name="rules_hint">True</property>
+ <property name="enable_search">False</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="resize">True</property>
+ <property name="shrink">False</property>
</packing>
</child>
<child>
- <widget class="GtkToolButton" id="toolbutton2">
+ <widget class="GtkAlignment" id="alignment1">
<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">Plugins</property>
- <property name="stock_id">gtk-disconnect</property>
- <signal name="clicked" handler="plugin_clicked"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
- <property name="visible">True</property>
+ <child>
+ <widget class="GtkNotebook" id="torrent_info">
+ <property name="visible">True</property>
+ <property name="show_border">False</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+ <child>
+ <widget class="GtkViewport" id="viewport1">
+ <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="resize_mode">GTK_RESIZE_QUEUE</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">10</property>
+ <child>
+ <widget class="GtkFrame" id="frame3">
+ <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_xalign">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment19">
+ <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="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">15</property>
+ <property name="right_padding">15</property>
+ <child>
+ <widget class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="n_rows">7</property>
+ <property name="n_columns">2</property>
+ <property name="row_spacing">2</property>
+ <child>
+ <widget class="GtkLabel" id="summary_torrent_path">
+ <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="wrap">True</property>
+ <property name="wrap_mode">PANGO_WRAP_CHAR</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment26">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <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">&lt;b&gt;Path:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_next_announce">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="wrap">True</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_tracker_status">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="wrap">True</property>
+ <property name="wrap_mode">PANGO_WRAP_CHAR</property>
+ <property name="selectable">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="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_tracker">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="wrap">True</property>
+ <property name="wrap_mode">PANGO_WRAP_CHAR</property>
+ <property name="selectable">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="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment25">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Name:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment24">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Next Announce:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment23">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Tracker Status:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <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="alignment22">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Tracker:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</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>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Total Size:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </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="summary_name">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="wrap">True</property>
+ <property name="wrap_mode">PANGO_WRAP_CHAR</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_total_size">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="selectable">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="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_num_files">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="selectable">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="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment20">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;# of files:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label26">
+ <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">&lt;b&gt;Torrent Info&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">15</property>
+ <property name="right_padding">15</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">5</property>
+ <child>
+ <widget class="GtkViewport" id="advanced_progressbar">
+ <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="resize_mode">GTK_RESIZE_QUEUE</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkDrawingArea" id="custom_progress">
+ <property name="height_request">25</property>
+ <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>
+ <signal name="expose_event" handler="paint_customprogress"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkProgressBar" id="progressbar">
+ <property name="visible">True</property>
+ <property name="pulse_step">0.10000000149</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">4</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <widget class="GtkLabel" id="summary_availability">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="wrap">True</property>
+ <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options"></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>
+ <property name="left_padding">15</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Availability:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment16">
+ <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">5</property>
+ <child>
+ <widget class="GtkLabel" id="summary_pieces">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ </child>
+ </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>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Pieces:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment11">
+ <property name="visible">True</property>
+ <property name="left_padding">15</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;ETA:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment10">
+ <property name="visible">True</property>
+ <property name="left_padding">15</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Peers:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </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="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="left_padding">15</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Speed:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </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="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="left_padding">15</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Speed:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Share Ratio:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Seeders:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Uploaded:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;b&gt;Downloaded:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_eta">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_share_ratio">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_peers">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_seeders">
+ <property name="visible">True</property>
+ <property name="xalign">0</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="summary_upload_speed">
+ <property name="visible">True</property>
+ <property name="xalign">0</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="summary_total_uploaded">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_download_speed">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="summary_total_downloaded">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <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">&lt;b&gt;Statistics&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="x_options"></property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="reorderable">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Details</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
+ <property name="resize">False</property>
+ <property name="shrink">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkStatusbar" id="statusbar">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -576,785 +1199,163 @@
</packing>
</child>
<child>
- <widget class="GtkStatusbar" id="statusbar">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkVPaned" id="vpaned1">
+ <widget class="GtkToolbar" id="tb_left">
<property name="visible">True</property>
+ <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+ <property name="icon_size">GTK_ICON_SIZE_SMALL_TOOLBAR</property>
+ <property name="icon_size_set">True</property>
<child>
- <widget class="GtkAlignment" id="alignment5">
+ <widget class="GtkToolButton" id="toolbutton_add">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add Torrent</property>
+ <property name="label" translatable="yes">Add</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-add</property>
+ <signal name="clicked" handler="add_torrent"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton_remove">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="tooltip" translatable="yes">Remove Torrent</property>
+ <property name="label" translatable="yes">Remove</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-remove</property>
+ <signal name="clicked" handler="remove_torrent"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton_clear">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Clear Seeding Torrents</property>
+ <property name="label" translatable="yes">Clear</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-clear</property>
+ <signal name="clicked" handler="clear_finished"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton_resume">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="tooltip" translatable="yes">Start or Resume Torrent</property>
+ <property name="label" translatable="yes">Resume</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-media-play</property>
+ <signal name="clicked" handler="tor_start"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton_pause">
<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="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <widget class="GtkTreeView" id="torrent_view">
- <property name="visible">True</property>
- <property name="headers_clickable">True</property>
- <property name="reorderable">True</property>
- <property name="rules_hint">True</property>
- <property name="enable_search">False</property>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="tooltip" translatable="yes">Pause Torrent</property>
+ <property name="label" translatable="yes">Pause</property>
+ <property name="stock_id">gtk-media-pause</property>
+ <signal name="clicked" handler="tor_pause"/>
</widget>
<packing>
- <property name="resize">True</property>
- <property name="shrink">False</property>
+ <property name="expand">False</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment1">
+ <widget class="GtkToolButton" id="toolbutton_up">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="tooltip" translatable="yes">Queue Torrent Up</property>
+ <property name="label" translatable="yes">Up</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-up</property>
+ <signal name="clicked" handler="queue_up"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton_down">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="tooltip" translatable="yes">Queue Torrent Down</property>
+ <property name="label" translatable="yes">Down</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-down</property>
+ <signal name="clicked" handler="queue_down"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSeparatorToolItem" id="separatortoolitem2">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton1">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Change Deluge preferences</property>
+ <property name="label" translatable="yes">Preferences</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-preferences</property>
+ <signal name="clicked" handler="pref_clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton2">
<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="GtkNotebook" id="torrent_info">
- <property name="visible">True</property>
- <property name="show_border">False</property>
- <property name="homogeneous">True</property>
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
- <child>
- <widget class="GtkViewport" id="viewport1">
- <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="resize_mode">GTK_RESIZE_QUEUE</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">10</property>
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="top_padding">10</property>
- <property name="bottom_padding">10</property>
- <property name="left_padding">15</property>
- <property name="right_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="spacing">5</property>
- <child>
- <widget class="GtkViewport" id="advanced_progressbar">
- <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="resize_mode">GTK_RESIZE_QUEUE</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkDrawingArea" id="custom_progress">
- <property name="height_request">25</property>
- <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>
- <signal name="expose_event" handler="paint_customprogress"/>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkProgressBar" id="progressbar">
- <property name="visible">True</property>
- <property name="pulse_step">0.10000000149</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">4</property>
- <property name="row_spacing">5</property>
- <child>
- <widget class="GtkLabel" id="summary_total_downloaded">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_download_speed">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_total_uploaded">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_upload_speed">
- <property name="visible">True</property>
- <property name="xalign">0</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="summary_seeders">
- <property name="visible">True</property>
- <property name="xalign">0</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="summary_peers">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_share_ratio">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_eta">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Downloaded:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Uploaded:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Seeders:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Share Ratio:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="left_padding">15</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Speed:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="visible">True</property>
- <property name="left_padding">15</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Speed:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </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="GtkAlignment" id="alignment10">
- <property name="visible">True</property>
- <property name="left_padding">15</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Peers:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </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="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="left_padding">15</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;ETA:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Pieces:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="summary_pieces">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </widget>
- </child>
- </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>
- </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>
- <property name="left_padding">15</property>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Availability:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_availability">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="wrap">True</property>
- <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label9">
- <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">&lt;b&gt;Statistics&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="x_options"></property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame3">
- <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_xalign">0</property>
- <child>
- <widget class="GtkAlignment" id="alignment19">
- <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="top_padding">10</property>
- <property name="bottom_padding">10</property>
- <property name="left_padding">15</property>
- <property name="right_padding">15</property>
- <child>
- <widget class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="n_rows">7</property>
- <property name="n_columns">2</property>
- <property name="row_spacing">2</property>
- <child>
- <widget class="GtkAlignment" id="alignment20">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;# of files:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </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="summary_num_files">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="selectable">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="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_total_size">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="selectable">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="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_name">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="wrap">True</property>
- <property name="wrap_mode">PANGO_WRAP_CHAR</property>
- <property name="selectable">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></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>
- <property name="right_padding">5</property>
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Total Size:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </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="GtkAlignment" id="alignment22">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Tracker:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment23">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Tracker Status:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <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="alignment24">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Next Announce:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment25">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">1</property>
- <property name="label" translatable="yes">&lt;b&gt;Name:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_tracker">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="wrap">True</property>
- <property name="wrap_mode">PANGO_WRAP_CHAR</property>
- <property name="selectable">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="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_tracker_status">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="wrap">True</property>
- <property name="wrap_mode">PANGO_WRAP_CHAR</property>
- <property name="selectable">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="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_next_announce">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="wrap">True</property>
- <property name="selectable">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment26">
- <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">5</property>
- <child>
- <widget class="GtkLabel" id="label25">
- <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">&lt;b&gt;Path:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="summary_torrent_path">
- <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="wrap">True</property>
- <property name="wrap_mode">PANGO_WRAP_CHAR</property>
- <property name="selectable">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label26">
- <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">&lt;b&gt;Torrent Info&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="reorderable">True</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Details</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
+ <property name="label" translatable="yes">Plugins</property>
+ <property name="stock_id">gtk-disconnect</property>
+ <signal name="clicked" handler="plugin_clicked"/>
</widget>
<packing>
- <property name="resize">False</property>
- <property name="shrink">False</property>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
</widget>
<packing>
- <property name="right_attach">3</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="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
diff --git a/libtorrent/include/libtorrent/kademlia/dht_tracker.hpp b/libtorrent/include/libtorrent/kademlia/dht_tracker.hpp
index c032c19d1..6882d34bb 100644
--- a/libtorrent/include/libtorrent/kademlia/dht_tracker.hpp
+++ b/libtorrent/include/libtorrent/kademlia/dht_tracker.hpp
@@ -45,6 +45,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/filesystem/operations.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/detail/atomic_count.hpp>
+#include <boost/thread/mutex.hpp>
#include "libtorrent/kademlia/node.hpp"
#include "libtorrent/kademlia/node_id.hpp"
@@ -125,6 +126,12 @@ namespace libtorrent { namespace dht
dht_settings const& m_settings;
int m_refresh_bucket;
+ // The mutex is used to abort the dht node
+ // it's only used to set m_abort to true
+ typedef boost::mutex mutex_t;
+ mutable mutex_t m_mutex;
+ bool m_abort;
+
// used to resolve hostnames for nodes
udp::resolver m_host_resolver;
diff --git a/libtorrent/include/libtorrent/kademlia/traversal_algorithm.hpp b/libtorrent/include/libtorrent/kademlia/traversal_algorithm.hpp
index b333b385e..74d79edc9 100644
--- a/libtorrent/include/libtorrent/kademlia/traversal_algorithm.hpp
+++ b/libtorrent/include/libtorrent/kademlia/traversal_algorithm.hpp
@@ -84,12 +84,11 @@ protected:
struct result
{
result(node_id const& id, udp::endpoint addr, unsigned char f = 0)
- : id(id), addr(addr), flags(f)
- {}
+ : id(id), addr(addr), flags(f) {}
node_id id;
udp::endpoint addr;
- enum { queried = 1, initial = 2 };
+ enum { queried = 1, initial = 2, no_id = 4 };
unsigned char flags;
};
@@ -150,7 +149,7 @@ traversal_algorithm::traversal_algorithm(
for (routing_table::router_iterator i = table.router_begin()
, end(table.router_end()); i != end; ++i)
{
- add_entry(generate_id(), *i, result::initial);
+ add_entry(node_id(0), *i, result::initial);
}
}
diff --git a/libtorrent/src/bt_peer_connection.cpp b/libtorrent/src/bt_peer_connection.cpp
index b1884496b..e76c652cb 100755
--- a/libtorrent/src/bt_peer_connection.cpp
+++ b/libtorrent/src/bt_peer_connection.cpp
@@ -1594,11 +1594,6 @@ namespace libtorrent
, boost::bind(&session_impl::free_disk_buffer
, boost::ref(m_ses), _1));
-/*
- buffer::interval i = allocate_send_buffer(r.length);
- std::memcpy(i.begin, buffer, r.length);
- t->filesystem().free_buffer(buffer);
-*/
m_payloads.push_back(range(send_buffer_size() - r.length, r.length));
setup_send();
}
diff --git a/libtorrent/src/kademlia/closest_nodes.cpp b/libtorrent/src/kademlia/closest_nodes.cpp
index 7551e806f..a11fe2559 100644
--- a/libtorrent/src/kademlia/closest_nodes.cpp
+++ b/libtorrent/src/kademlia/closest_nodes.cpp
@@ -110,12 +110,13 @@ void closest_nodes::invoke(node_id const& id, udp::endpoint addr)
void closest_nodes::done()
{
std::vector<node_entry> results;
- int result_size = m_table.bucket_size();
- if (result_size > (int)m_results.size()) result_size = (int)m_results.size();
+ int num_results = m_table.bucket_size();
for (std::vector<result>::iterator i = m_results.begin()
- , end(m_results.begin() + result_size); i != end; ++i)
+ , end(m_results.end()); i != end && num_results >= 0; ++i)
{
+ if (i->flags & result::no_id) continue;
results.push_back(node_entry(i->id, i->addr));
+ --num_results;
}
m_done_callback(results);
}
diff --git a/libtorrent/src/kademlia/dht_tracker.cpp b/libtorrent/src/kademlia/dht_tracker.cpp
index fe6a516ba..56bc765de 100644
--- a/libtorrent/src/kademlia/dht_tracker.cpp
+++ b/libtorrent/src/kademlia/dht_tracker.cpp
@@ -158,6 +158,7 @@ namespace libtorrent { namespace dht
, m_refresh_timer(ios)
, m_settings(settings)
, m_refresh_bucket(160)
+ , m_abort(false)
, m_host_resolver(ios)
, m_refs(0)
{
@@ -220,6 +221,8 @@ namespace libtorrent { namespace dht
void dht_tracker::stop()
{
+ mutex_t::scoped_lock l(m_mutex);
+ m_abort = true;
m_timer.cancel();
m_connection_timer.cancel();
m_refresh_timer.cancel();
@@ -237,7 +240,9 @@ namespace libtorrent { namespace dht
void dht_tracker::connection_timeout(asio::error_code const& e)
try
{
- if (e) return;
+ mutex_t::scoped_lock l(m_mutex);
+ if (e || m_abort) return;
+
if (!m_socket.is_open()) return;
time_duration d = m_dht.connection_timeout();
m_connection_timer.expires_from_now(d);
@@ -255,7 +260,9 @@ namespace libtorrent { namespace dht
void dht_tracker::refresh_timeout(asio::error_code const& e)
try
{
- if (e) return;
+ mutex_t::scoped_lock l(m_mutex);
+ if (e || m_abort) return;
+
if (!m_socket.is_open()) return;
time_duration d = m_dht.refresh_timeout();
m_refresh_timer.expires_from_now(d);
@@ -281,7 +288,9 @@ namespace libtorrent { namespace dht
void dht_tracker::tick(asio::error_code const& e)
try
{
- if (e) return;
+ mutex_t::scoped_lock l(m_mutex);
+ if (e || m_abort) return;
+
if (!m_socket.is_open()) return;
m_timer.expires_from_now(minutes(tick_period));
m_timer.async_wait(m_strand.wrap(bind(&dht_tracker::tick, self(), _1)));
diff --git a/libtorrent/src/kademlia/node.cpp b/libtorrent/src/kademlia/node.cpp
index d4b343519..60dfa2d20 100644
--- a/libtorrent/src/kademlia/node.cpp
+++ b/libtorrent/src/kademlia/node.cpp
@@ -174,6 +174,12 @@ void node_impl::refresh(node_id const& id
void node_impl::bootstrap(std::vector<udp::endpoint> const& nodes
, boost::function0<void> f)
{
+#ifdef TORRENT_DHT_VERBOSE_LOGGING
+ TORRENT_LOG(node) << "bootrapping: " << nodes.size();
+ for (std::vector<udp::endpoint>::const_iterator i = nodes.begin()
+ , end(nodes.end()); i != end; ++i)
+ TORRENT_LOG(node) << " " << *i;
+#endif
std::vector<node_entry> start;
start.reserve(nodes.size());
std::copy(nodes.begin(), nodes.end(), std::back_inserter(start));
@@ -254,6 +260,11 @@ namespace
, int listen_port, sha1_hash const& ih
, boost::function<void(std::vector<tcp::endpoint> const&, sha1_hash const&)> f)
{
+#ifdef TORRENT_DHT_VERBOSE_LOGGING
+ TORRENT_LOG(node) << "announce response [ ih: " << ih
+ << " p: " << listen_port
+ << " nodes: " << v.size() << " ]" ;
+#endif
bool nodes = false;
// only store on the first k nodes
for (std::vector<node_entry>::const_iterator i = v.begin()
@@ -271,6 +282,9 @@ namespace
void node_impl::add_router_node(udp::endpoint router)
{
+#ifdef TORRENT_DHT_VERBOSE_LOGGING
+ TORRENT_LOG(node) << "adding router node: " << router;
+#endif
m_table.add_router_node(router);
}
@@ -288,6 +302,9 @@ void node_impl::add_node(udp::endpoint node)
void node_impl::announce(sha1_hash const& info_hash, int listen_port
, boost::function<void(std::vector<tcp::endpoint> const&, sha1_hash const&)> f)
{
+#ifdef TORRENT_DHT_VERBOSE_LOGGING
+ TORRENT_LOG(node) << "announcing [ ih: " << info_hash << " p: " << listen_port << " ]" ;
+#endif
// search for nodes with ids close to id, and then invoke the
// get_peers and then announce_peer rpc on them.
closest_nodes::initiate(info_hash, m_settings.search_branching
diff --git a/libtorrent/src/kademlia/routing_table.cpp b/libtorrent/src/kademlia/routing_table.cpp
index c0ba68080..359577613 100644
--- a/libtorrent/src/kademlia/routing_table.cpp
+++ b/libtorrent/src/kademlia/routing_table.cpp
@@ -436,7 +436,8 @@ void routing_table::find_node(node_id const& target
routing_table::iterator routing_table::begin() const
{
- return iterator(m_buckets.begin(), m_buckets.end());
+ // +1 to avoid ourself
+ return iterator(m_buckets.begin() + 1, m_buckets.end());
}
routing_table::iterator routing_table::end() const
diff --git a/libtorrent/src/kademlia/traversal_algorithm.cpp b/libtorrent/src/kademlia/traversal_algorithm.cpp
index b0d3c5e74..8849b155b 100644
--- a/libtorrent/src/kademlia/traversal_algorithm.cpp
+++ b/libtorrent/src/kademlia/traversal_algorithm.cpp
@@ -51,7 +51,12 @@ void traversal_algorithm::add_entry(node_id const& id, udp::endpoint addr, unsig
{
if (m_failed.find(addr) != m_failed.end()) return;
- result const entry(id, addr, flags);
+ result entry(id, addr, flags);
+ if (entry.id.is_all_zeros())
+ {
+ entry.id = generate_id();
+ entry.flags |= result::no_id;
+ }
std::vector<result>::iterator i = std::lower_bound(
m_results.begin()
@@ -83,6 +88,7 @@ boost::pool<>& traversal_algorithm::allocator() const
void traversal_algorithm::traverse(node_id const& id, udp::endpoint addr)
{
+ TORRENT_ASSERT(!id.is_all_zeros());
add_entry(id, addr, 0);
}
@@ -100,6 +106,7 @@ void traversal_algorithm::failed(node_id const& id, bool prevent_request)
{
m_invoke_count--;
+ TORRENT_ASSERT(!id.is_all_zeros());
std::vector<result>::iterator i = std::find_if(
m_results.begin()
, m_results.end()
@@ -119,6 +126,10 @@ void traversal_algorithm::failed(node_id const& id, bool prevent_request)
#ifdef TORRENT_DHT_VERBOSE_LOGGING
TORRENT_LOG(traversal) << "failed: " << i->id << " " << i->addr;
#endif
+ // don't tell the routing table about
+ // node ids that we just generated ourself
+ if ((i->flags & result::no_id) == 0)
+ m_table.node_failed(id);
m_results.erase(i);
}
if (prevent_request)
@@ -126,10 +137,6 @@ void traversal_algorithm::failed(node_id const& id, bool prevent_request)
--m_branch_factor;
if (m_branch_factor <= 0) m_branch_factor = 1;
}
- else
- {
- m_table.node_failed(id);
- }
add_requests();
if (m_invoke_count == 0) done();
}
diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp
index dbc6f4e43..38e80c895 100755
--- a/libtorrent/src/peer_connection.cpp
+++ b/libtorrent/src/peer_connection.cpp
@@ -2402,6 +2402,7 @@ namespace libtorrent
if (ret != r.length || m_torrent.expired())
{
+ if (j.buffer) m_ses.free_disk_buffer(j.buffer);
boost::shared_ptr<torrent> t = m_torrent.lock();
if (!t)
{
diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp
index af871d6bf..0a6b7176c 100755
--- a/libtorrent/src/session_impl.cpp
+++ b/libtorrent/src/session_impl.cpp
@@ -240,7 +240,7 @@ namespace detail
if (m_ses.m_alerts.should_post(alert::info))
{
m_ses.m_alerts.post_alert(torrent_checked_alert(
- processing->torrent_ptr->get_handle()
+ t->torrent_ptr->get_handle()
, "torrent finished checking"));
}
if (t->torrent_ptr->is_seed() && m_ses.m_alerts.should_post(alert::info))
diff --git a/setup.py b/setup.py
index 7640ff558..012746fb4 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@
NAME = "deluge"
FULLNAME = "Deluge BitTorrent Client"
-VERSION = "0.5.8.6"
+VERSION = "0.5.8.7"
AUTHOR = "Zach Tibbitts, Alon Zakai, Marcos Pinto, Andrew Resch, Alex Dedul"
EMAIL = "zach@collegegeek.org, kripkensteiner@gmail.com, marcospinto@dipconsultants.com, alonzakai@gmail.com, rotmer@gmail.com"
DESCRIPTION = "A GTK BitTorrent client written in Python and C++"
diff --git a/src/common.py b/src/common.py
index 77be08a5d..8c2a9757c 100644
--- a/src/common.py
+++ b/src/common.py
@@ -32,7 +32,7 @@ import os
import xdg.BaseDirectory
PROGRAM_NAME = "Deluge"
-PROGRAM_VERSION = "0.5.8.6"
+PROGRAM_VERSION = "0.5.8.7"
CLIENT_CODE = "DE"
CLIENT_VERSION = "".join(PROGRAM_VERSION.split('.'))+"0"*(4 - len(PROGRAM_VERSION.split('.')))