diff --git a/glade/delugegtk.glade b/glade/delugegtk.glade index 1aa38d149..c4d78d236 100644 --- a/glade/delugegtk.glade +++ b/glade/delugegtk.glade @@ -13,180 +13,787 @@ 4 3 - + True - False - - True - Add Torrent - Add - True - gtk-add - - - - False - - - - - True - False - Remove Torrent - Remove - True - gtk-remove - - - - False - - - - - True - Clear Seeding Torrents - Clear - True - gtk-clear - - - - False - - - - - True - - - False - False - - - - - True - False - Start or Resume Torrent - Resume - True - gtk-media-play - - - - False - - - - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Pause Torrent - Pause - gtk-media-pause - + + + True + False + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + True + True + False + + + + - False + True + False - - True - False - Queue Torrent Up - Up - True - gtk-go-up - - - - False - - - - - True - False - Queue Torrent Down - Down - True - gtk-go-down - - - - False - - - - - True - - - False - False - - - - - True - Change Deluge preferences - Preferences - True - gtk-preferences - - - - False - - - - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Plugins - gtk-disconnect - + + + True + False + True + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_NEVER + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + True + 1 + 2 + 10 + + + True + 0 + + + True + 10 + 10 + 15 + 15 + + + True + 5 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + 25 + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + + + + + + True + 0.10000000149 + + + False + False + 1 + + + + + True + 5 + 4 + 5 + + + True + 0 + True + PANGO_WRAP_WORD_CHAR + + + 3 + 4 + 4 + 5 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 15 + 5 + + + True + 0 + 1 + <b>Availability:</b> + True + + + + + 2 + 3 + 4 + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + + + + + 1 + 2 + 4 + 5 + + + + + True + 0 + 1 + <b>Pieces:</b> + True + + + 4 + 5 + + + + + True + 15 + 5 + + + True + 0 + <b>ETA:</b> + True + + + + + 2 + 3 + 3 + 4 + + + + + True + 15 + 5 + + + True + 0 + <b>Peers:</b> + True + + + + + 2 + 3 + 2 + 3 + + + + + True + 15 + 5 + + + True + 0 + <b>Speed:</b> + True + + + + + 2 + 3 + 1 + 2 + + + + + True + 15 + 5 + + + True + 0 + <b>Speed:</b> + True + + + + + 2 + 3 + + + + + True + 5 + + + True + 0 + <b>Share Ratio:</b> + True + + + + + 3 + 4 + + + + + True + 5 + + + True + 0 + <b>Seeders:</b> + True + + + + + 2 + 3 + + + + + True + 5 + + + True + 0 + <b>Uploaded:</b> + True + + + + + 1 + 2 + + + + + True + 5 + + + True + 0 + <b>Downloaded:</b> + True + + + + + + + True + 0 + + + 3 + 4 + 3 + 4 + + + + + True + 0 + + + 1 + 2 + 3 + 4 + + + + + True + 0 + + + 3 + 4 + 2 + 3 + + + + + True + 0 + + + 1 + 2 + 2 + 3 + + + + + True + 0 + + + 3 + 4 + 1 + 2 + + + + + True + 0 + + + 1 + 2 + 1 + 2 + + + + + True + 0 + + + 3 + 4 + + + + + True + 0 + + + 1 + 2 + + + + + False + 2 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Statistics</b> + True + + + label_item + + + + + + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 + 10 + 15 + 15 + + + True + 7 + 2 + 2 + + + True + 0 + + + 1 + 2 + 1 + 2 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 0 + 1 + <b>Path:</b> + True + + + + + 1 + 2 + GTK_FILL + + + + + True + 0 + + + 1 + 2 + 2 + 3 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 1 + <b>Total Size:</b> + True + + + + + 2 + 3 + GTK_FILL + + + + + True + 0 + + + 1 + 2 + 3 + 4 + + + + + + True + 0 + True + PANGO_WRAP_WORD_CHAR + + + 1 + 2 + 4 + 5 + + + + + + True + 0 + + + 1 + 2 + 5 + 6 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 1 + <b>Tracker Status:</b> + True + + + + + 5 + 6 + + + + + True + 0 + + + 1 + 2 + 6 + 7 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 1 + <b>Next Announce:</b> + True + + + + + 6 + 7 + GTK_FILL + + + + + True + 0 + True + PANGO_WRAP_WORD_CHAR + + + 1 + 2 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 1 + <b># of files:</b> + True + + + + + + + 3 + 4 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 1 + <b>Tracker:</b> + True + + + + + + + 4 + 5 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + 0 + 0 + 1 + <b>Name:</b> + True + + + + + GTK_FILL + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Torrent Info</b> + True + + + label_item + + + + + 1 + 2 + GTK_FILL + + + + + + + + + True + + + + + True + Details + + + tab + False + + + + - False + False + False - 1 - 2 - GTK_FILL - - - - - True - False - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - False - - - 2 3 - 1 - 2 - - GTK_FILL + 2 + 3 + + + + + True + + + 3 + 3 + 4 + @@ -513,770 +1120,180 @@ - + True + False + 2 3 - 3 - 4 - + 1 + 2 + + GTK_FILL - + True + False + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + False - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - True - True - False - - - - + Add Torrent + Add + True + gtk-add + - True - False + False - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - False - True - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_NEVER - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE - - - True - 1 - 2 - 10 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - 10 - 15 - 15 - - - True - 7 - 2 - 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 0 - 1 - <b>Name:</b> - True - - - - - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 1 - <b>Tracker:</b> - True - - - - - - - 4 - 5 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 1 - <b># of files:</b> - True - - - - - - - 3 - 4 - GTK_FILL - - - - - True - 0 - True - PANGO_WRAP_WORD_CHAR - - - 1 - 2 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 1 - <b>Next Announce:</b> - True - - - - - 6 - 7 - GTK_FILL - - - - - True - 0 - - - 1 - 2 - 6 - 7 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 1 - <b>Tracker Status:</b> - True - - - - - 5 - 6 - - - - - True - 0 - - - 1 - 2 - 5 - 6 - - - - - - True - 0 - True - PANGO_WRAP_WORD_CHAR - - - 1 - 2 - 4 - 5 - - - - - - True - 0 - - - 1 - 2 - 3 - 4 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 1 - <b>Total Size:</b> - True - - - - - 2 - 3 - GTK_FILL - - - - - True - 0 - - - 1 - 2 - 2 - 3 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 0 - 1 - <b>Path:</b> - True - - - - - 1 - 2 - GTK_FILL - - - - - True - 0 - - - 1 - 2 - 1 - 2 - - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>Torrent Info</b> - True - - - label_item - - - - - 1 - 2 - GTK_FILL - - - - - True - 0 - - - True - 10 - 10 - 15 - 15 - - - True - 5 - - - True - 0.10000000149 - - - False - False - - - - - True - 5 - 4 - 5 - - - True - 0 - True - PANGO_WRAP_WORD_CHAR - - - 3 - 4 - 4 - 5 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 15 - 5 - - - True - 0 - 1 - <b>Availability:</b> - True - - - - - 2 - 3 - 4 - 5 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - - - - - 1 - 2 - 4 - 5 - - - - - True - 0 - 1 - <b>Pieces:</b> - True - - - 4 - 5 - - - - - True - 15 - 5 - - - True - 0 - <b>ETA:</b> - True - - - - - 2 - 3 - 3 - 4 - - - - - True - 15 - 5 - - - True - 0 - <b>Peers:</b> - True - - - - - 2 - 3 - 2 - 3 - - - - - True - 15 - 5 - - - True - 0 - <b>Speed:</b> - True - - - - - 2 - 3 - 1 - 2 - - - - - True - 15 - 5 - - - True - 0 - <b>Speed:</b> - True - - - - - 2 - 3 - - - - - True - 5 - - - True - 0 - <b>Share Ratio:</b> - True - - - - - 3 - 4 - - - - - True - 5 - - - True - 0 - <b>Seeders:</b> - True - - - - - 2 - 3 - - - - - True - 5 - - - True - 0 - <b>Uploaded:</b> - True - - - - - 1 - 2 - - - - - True - 5 - - - True - 0 - <b>Downloaded:</b> - True - - - - - - - True - 0 - - - 3 - 4 - 3 - 4 - - - - - True - 0 - - - 1 - 2 - 3 - 4 - - - - - True - 0 - - - 3 - 4 - 2 - 3 - - - - - True - 0 - - - 1 - 2 - 2 - 3 - - - - - True - 0 - - - 3 - 4 - 1 - 2 - - - - - True - 0 - - - 1 - 2 - 1 - 2 - - - - - True - 0 - - - 3 - 4 - - - - - True - 0 - - - 1 - 2 - - - - - False - 1 - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>Statistics</b> - True - - - label_item - - - - - - GTK_FILL - - - - - - - - - True - - - - - True - Details - - - tab - False - - - - + False + Remove Torrent + Remove + True + gtk-remove + - False - False + False + + + + + True + Clear Seeding Torrents + Clear + True + gtk-clear + + + + False + + + + + True + + + False + False + + + + + True + False + Start or Resume Torrent + Resume + True + gtk-media-play + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Pause Torrent + Pause + gtk-media-pause + + + + False + + + + + True + False + Queue Torrent Up + Up + True + gtk-go-up + + + + False + + + + + True + False + Queue Torrent Down + Down + True + gtk-go-down + + + + False + + + + + True + + + False + False + + + + + True + Change Deluge preferences + Preferences + True + gtk-preferences + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Plugins + gtk-disconnect + + + + False - 3 - 2 - 3 + 1 + 2 + GTK_FILL diff --git a/glade/file_tab_menu.glade b/glade/file_tab_menu.glade index f93eef209..7cef23e55 100644 --- a/glade/file_tab_menu.glade +++ b/glade/file_tab_menu.glade @@ -62,6 +62,29 @@ True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Rename File + True + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-edit + 1 + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + True diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index c3a75aafd..474846bf4 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -67,6 +67,19 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + Select A Folder + + + 1 + 2 + + True @@ -81,19 +94,6 @@ - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER - Select A Folder - - - 1 - 2 - - 1 @@ -105,6 +105,13 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Store all torrent files in: + + True @@ -124,13 +131,6 @@ 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Store all torrent files in: - - 2 @@ -174,6 +174,16 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Autoload all torrent files in: + 0 + True + + True @@ -192,16 +202,6 @@ 2 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Autoload all torrent files in: - 0 - True - - @@ -1158,10 +1158,10 @@ Either 5 2 - + True True - The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited. + The maximum upload slots for all torrents. Set -1 for unlimited. 1 -1 -1 9000 1 10 10 1 @@ -1169,51 +1169,93 @@ Either 1 2 - 4 - 5 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - - - True - The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited. - 0 - Maximum Half-Open Connections: - - - - - 4 - 5 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - - - True - The maximum upload speed for all torrents. Set -1 for unlimited. - 0 - Maximum Upload Slots: - - - - 3 4 GTK_FILL + + + True + True + The maximum upload speed for all torrents. Set -1 for unlimited. + 1 + 0 -1 9000 1 10 10 + 1 + 1 + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + The maximum download speed for all torrents. Set -1 for unlimited. + 1 + 0 -1 9000 1 10 10 + 1 + 1 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + The maximum download speed for all torrents. Set -1 for unlimited. + 0 + Maximum Download Speed (KiB/s): + + + 1 + 2 + + + + + True + True + The maximum number of connections allowed. Set -1 for unlimited. + 1 + -1 -1 1000 1 10 10 + 1 + + + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 + + + True + The maximum number of connections allowed. Set -1 for unlimited. + 0 + Maximum Connections: + + + + + GTK_FILL + + True @@ -1235,92 +1277,50 @@ Either - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 - + True - The maximum number of connections allowed. Set -1 for unlimited. + The maximum upload speed for all torrents. Set -1 for unlimited. 0 - Maximum Connections: + Maximum Upload Slots: + 3 + 4 GTK_FILL - + True - True - The maximum number of connections allowed. Set -1 for unlimited. - 1 - -1 -1 1000 1 10 10 - 1 - - - 1 - 2 - GTK_FILL - - - - - True - The maximum download speed for all torrents. Set -1 for unlimited. - 0 - Maximum Download Speed (KiB/s): - - - 1 - 2 - - - - - True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - The maximum download speed for all torrents. Set -1 for unlimited. - 1 - 0 -1 9000 1 10 10 - 1 - 1 + 10 + + + True + The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited. + 0 + Maximum Half-Open Connections: + + - 1 - 2 - 1 - 2 + 4 + 5 GTK_FILL - + True True - The maximum upload speed for all torrents. Set -1 for unlimited. - 1 - 0 -1 9000 1 10 10 - 1 - 1 - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - True - True - The maximum upload slots for all torrents. Set -1 for unlimited. + The maximum half-open connections. A high value may crash some cheap routers. Set -1 for unlimited. 1 -1 -1 9000 1 10 10 1 @@ -1328,8 +1328,8 @@ Either 1 2 - 3 - 4 + 4 + 5 GTK_FILL @@ -1374,19 +1374,35 @@ Either 2 2 - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - The maximum number of connections per torrent. Set -1 for unlimited. - 0 - Maximum Connections: - - + True + The maximum upload slots per torrent. Set -1 for unlimited. + 1 + -1 -1 1000 1 10 10 + 1 + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + True + The maximum number of connections per torrent. Set -1 for unlimited. + 1 + -1 -1 1000 1 10 10 + + + 1 + 2 + GTK_FILL + @@ -1408,35 +1424,19 @@ Either - + True - True - The maximum number of connections per torrent. Set -1 for unlimited. - 1 - -1 -1 1000 1 10 10 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + The maximum number of connections per torrent. Set -1 for unlimited. + 0 + Maximum Connections: + + - - 1 - 2 - GTK_FILL - - - - - True - True - The maximum upload slots per torrent. Set -1 for unlimited. - 1 - -1 -1 1000 1 10 10 - 1 - - - 1 - 2 - 1 - 2 - GTK_FILL - @@ -1546,46 +1546,73 @@ Either - + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 8080 0 10000 1 10 10 + + + 3 + 4 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Port + + + 2 + 3 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Server + + + 2 + 3 + + + + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 2 + 3 + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - 4 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Proxy type - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Username - - + 1 + 2 1 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Password - - - 2 - 3 - - True @@ -1604,71 +1631,44 @@ HTTP W/ Auth - + True - False - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Password - 1 - 2 - 1 - 2 - - - - - True - False - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 1 - 2 2 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Server + Username - 2 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Port - - - 2 - 3 1 2 - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Proxy type + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 8080 0 10000 1 10 10 3 4 - 1 - 2 @@ -1741,46 +1741,73 @@ HTTP W/ Auth - + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 8080 0 10000 1 10 10 + + + 3 + 4 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Port + + + 2 + 3 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Server + + + 2 + 3 + + + + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 2 + 3 + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - 4 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Proxy type - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Username - - + 1 + 2 1 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Password - - - 2 - 3 - - True @@ -1799,71 +1826,44 @@ HTTP W/ Auth - + True - False - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Password - 1 - 2 - 1 - 2 - - - - - True - False - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 1 - 2 2 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Server + Username - 2 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Port - - - 2 - 3 1 2 - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Proxy type + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 8080 0 10000 1 10 10 3 4 - 1 - 2 @@ -1936,46 +1936,73 @@ HTTP W/ Auth - + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 8080 0 10000 1 10 10 + + + 3 + 4 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Port + + + 2 + 3 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Server + + + 2 + 3 + + + + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 2 + 3 + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - 4 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Proxy type - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Username - - + 1 + 2 1 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Password - - - 2 - 3 - - True @@ -1994,71 +2021,44 @@ HTTP W/ Auth - + True - False - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Password - 1 - 2 - 1 - 2 - - - - - True - False - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 1 - 2 2 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Server + Username - 2 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Port - - - 2 - 3 1 2 - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Proxy type + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 8080 0 10000 1 10 10 3 4 - 1 - 2 @@ -2131,46 +2131,73 @@ HTTP W/ Auth - + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 8080 0 10000 1 10 10 + + + 3 + 4 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Port + + + 2 + 3 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Server + + + 2 + 3 + + + + + True + False + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 2 + 3 + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - 4 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Proxy type - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Username - - + 1 + 2 1 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Password - - - 2 - 3 - - True @@ -2189,71 +2216,44 @@ HTTP W/ Auth - + True - False - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Password - 1 - 2 - 1 - 2 - - - - - True - False - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 1 - 2 2 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Server + Username - 2 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Port - - - 2 - 3 1 2 - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Proxy type + + + + True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 8080 0 10000 1 10 10 3 4 - 1 - 2 @@ -2476,22 +2476,41 @@ HTTP W/ Auth 2 2 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 40 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + Open folder with: + 0 + True + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Custom: + 0 + True + True + radio_open_folder_stock + - 1 - 2 1 2 @@ -2518,45 +2537,26 @@ Thunar - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 40 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Custom: - 0 - True - True - radio_open_folder_stock - + + 1 + 2 1 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Open folder with: - 0 - True - True - - - - False @@ -2648,6 +2648,7 @@ Thunar + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 GTK_SHADOW_NONE diff --git a/plugins/TorrentFiles/tab_files.py b/plugins/TorrentFiles/tab_files.py index eb7917fc5..91e532223 100644 --- a/plugins/TorrentFiles/tab_files.py +++ b/plugins/TorrentFiles/tab_files.py @@ -106,6 +106,43 @@ an error trying to launch the file.")) except KeyError: pass + def rename_file(self, widget=None): + import os, gtk + import deluge.common + dlg = gtk.Dialog(_("Rename File"), None, 0, + (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,gtk.STOCK_OK, gtk.RESPONSE_OK)) + dlg.set_default_response(gtk.RESPONSE_OK) + dlg.set_modal(True) + dlg.set_icon(deluge.common.get_logo(32)) + label = gtk.Label(_("Enter the new name of the file")) + entry = gtk.Entry() + entry.connect("activate", lambda w : dlg.response(gtk.RESPONSE_OK)) + dlg.vbox.pack_start(label) + dlg.vbox.pack_start(entry) + save_dir = self.manager.unique_IDs[self.file_unique_id].save_dir + selected_paths = self.file_view.get_selection().get_selected_rows()[1] + try: + for path in selected_paths: + child_path = self.file_store_sorted.\ + convert_path_to_child_path(path) + file_name = self.file_store.get_value( + self.file_store.get_iter(child_path), 0) + file_size = self.file_store.get_value( + self.file_store.get_iter(child_path), 1) + entry.set_text(file_name) + gtk.gdk.threads_enter() + dlg.show_all() + response = dlg.run() + if response == gtk.RESPONSE_OK: + new_name = entry.get_text().decode("utf_8") + dlg.destroy() + self.manager.rename_file(self.file_unique_id, new_name, file_size) + else: + dlg.destroy() + gtk.gdk.threads_leave() + except: + pass + # From core to UI def prepare_file_store(self): if not self.file_store_dict: diff --git a/src/core.py b/src/core.py index c57c2d0b0..23f5def7c 100644 --- a/src/core.py +++ b/src/core.py @@ -1052,3 +1052,6 @@ of HD space! Oops!\nWe had to pause at least one torrent")) torrent_path = os.path.join(torrent_path, file["path"].split("/", 1)[0]) return torrent_path + + def rename_file(self, unique_ID, filename, filesize): + return deluge_core.remap_files(unique_ID, filename, filesize) diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 2ee77f5a7..05ee7446c 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -929,8 +929,33 @@ static PyObject *torrent_get_torrent_state(PyObject *self, PyObject *args) total_seeds = s.num_complete != -1? s.num_complete : connected_seeds; total_peers = s.num_incomplete != -1? s.num_incomplete : connected_peers; + // The following section computes the ranges of pieces that have been downloaded + std::vector downloaded_range; + bool range_opened=false; + for (unsigned int i=0; i<=s.pieces->size(); ++i) { + bool downloaded=(isize() && s.pieces->at(i)); + if (!range_opened) { + if (downloaded) { + range_opened=true; + downloaded_range.push_back(i); + } + } else { + if (!downloaded) { + range_opened=false; + downloaded_range.push_back(i-1); + } + } + } + PyObject *pieces_range = PyTuple_New(downloaded_range.size()/2); + for(unsigned long i=0; i* + "pieces", pieces_range, "pieces_done", s.num_pieces, "block_size", s.block_size, "total_size", i.total_size(), @@ -1809,7 +1834,8 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args) trackerlist.push_back(a_entry); } if (trackerlist.empty()){ - printf("libtorrent didnt like that...trackers cant be empty\n"); + std::vector empty; + M_torrents->at(index).handle.replace_trackers(empty); } else{ M_torrents->at(index).handle.replace_trackers(trackerlist); @@ -1841,19 +1867,6 @@ static PyObject *torrent_prioritize_files(PyObject *self, PyObject *args) } t.handle.prioritize_files(priorities_vector); - - #ifndef NDEBUG - int num_pieces = t.handle.get_torrent_info().num_pieces(); - - std::vector priorities_pieces_vector(num_pieces); - priorities_pieces_vector = t.handle.piece_priorities(); - - std::cout << "after files prioritization\n"; - for (long i = 0; i < num_pieces; i++) { - std::cout << priorities_pieces_vector.at(i); - } - std::cout << "\n"; - #endif Py_INCREF(Py_None); return Py_None; } @@ -2009,6 +2022,34 @@ static PyObject *torrent_add_url_seed(PyObject *self, PyObject *args) Py_INCREF(Py_None); return Py_None; } +static PyObject *torrent_remap_files(PyObject *self, PyObject *args) +{ + python_long unique_ID; + const char *file_name; + float file_size; + if (!PyArg_ParseTuple(args, "isf", &unique_ID, &file_name, &file_size)) + return NULL; + long index = get_index_from_unique_ID(unique_ID); + if (PyErr_Occurred()) + return NULL; + + if (M_torrents->at(index).handle.is_valid()){ + libtorrent:size_type new_size = file_size; + std::pair list = std::make_pair(file_name, new_size); + std::vector > Vector; + Vector.push_back(list); + torrent_info t = M_torrents->at(index).handle.get_torrent_info(); + bool ret = t.remap_files(Vector); + if (ret){ + printf("it worked!\n"); + } + else{ + printf("it failed!\n"); + } + } + Py_INCREF(Py_None); return Py_None; +} + //==================== // Python Module data //==================== @@ -2073,6 +2114,7 @@ static PyMethodDef deluge_core_methods[] = {"get_piece_info", torrent_get_piece_info, METH_VARARGS, "."}, {"get_all_piece_info", torrent_get_all_piece_info, METH_VARARGS, "."}, {"get_file_piece_range", torrent_get_file_piece_range, METH_VARARGS, "."}, + {"remap_files", torrent_remap_files, METH_VARARGS, "."}, {NULL} }; diff --git a/src/dialogs.py b/src/dialogs.py index aa5edc568..1463e6d26 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -154,6 +154,7 @@ class PreferencesDlg: self.glade.get_widget("ratio_spinner").set_value(self.preferences.get("auto_seed_ratio")) self.glade.get_widget("chk_dht").set_active(self.preferences.get("enable_dht")) self.glade.get_widget("spin_gui").set_value(self.preferences.get("gui_update_interval")) + self.glade.get_widget("chk_use_advanced_bar").set_active(self.preferences.get("use_advanced_bar")) #smart dialog set sensitivities if(self.preferences.get("use_default_dir")): @@ -271,6 +272,7 @@ class PreferencesDlg: self.preferences.set("clear_max_ratio_torrents", self.glade.get_widget("chk_clear_max_ratio_torrents").get_active()) self.preferences.set("queue_above_completed", self.glade.get_widget("chk_queue_above_completed").get_active()) self.preferences.set("start_paused", self.glade.get_widget("chk_paused").get_active()) + self.preferences.set("use_advanced_bar", self.glade.get_widget("chk_use_advanced_bar").get_active()) interface.apply_prefs() interface.config.save() diff --git a/src/files.py b/src/files.py index 49c1087cb..01ffc0e3b 100644 --- a/src/files.py +++ b/src/files.py @@ -51,6 +51,7 @@ class FilesBaseManager(object): self.file_menu = self.glade.get_widget("file_tab_menu") self.glade.signal_autoconnect({ "open_file" : self.open_file, + "rename_file" : self.rename_file, "select_all": self.file_select_all, "unselect_all": self.file_unselect_all, "priority_dont_download": self.priority_clicked, @@ -69,6 +70,9 @@ class FilesBaseManager(object): def open_file(self): pass + def rename_file(self): + pass + def build_file_view(self): def priority(column, cell, model, iter, data): priority = common.fpriority(model.get_value(iter, data)) @@ -154,6 +158,8 @@ class FilesDialogManager(FilesBaseManager): # not added yet self.glade.get_widget("open_file").hide() self.glade.get_widget("open_file_separator").hide() + self.glade.get_widget("rename_file").hide() + self.glade.get_widget("rename_file_separator").hide() def prepare_file_store(self): for file in self.dumped_torrent: diff --git a/src/pref.py b/src/pref.py index 31a5525dd..11187ea61 100644 --- a/src/pref.py +++ b/src/pref.py @@ -147,7 +147,8 @@ if common.windows_check(): "filename_f_width" : 220, "size_f_width" : 90, "priority_f_width" : 140, - "start_paused": False + "start_paused": False, + "use_advanced_bar" : True } else: DEFAULT_PREFS = { @@ -257,7 +258,8 @@ else: "filename_f_width" : 220, "size_f_width" : 90, "priority_f_width" : 140, - "start_paused": False + "start_paused": False, + "use_advanced_bar" : True } class Preferences: @@ -287,9 +289,9 @@ class Preferences: def __setitem__(self, key, value): if key not in self.mapping or self.mapping[key]!=value: - self.mapping[key] = value - for hook in self.change_hooks: - if (hook[0]==key): hook[1]() + self.mapping[key] = value + for hook in self.change_hooks: + if (hook[0]==key): hook[1]() def __delitem__(self, key): del self.mapping[key] diff --git a/src/tab_details.py b/src/tab_details.py index ad2714239..d8addb28a 100644 --- a/src/tab_details.py +++ b/src/tab_details.py @@ -31,6 +31,7 @@ # statement from all source files in the program, then also delete it here. import common +import gtk class DetailsTabManager(object): def __init__(self, glade, manager): @@ -40,6 +41,8 @@ class DetailsTabManager(object): # Look into glade's widget prefix function self.progress_bar = glade.get_widget("progressbar") + self.custom_progress = glade.get_widget("custom_progress") + self.custom_progress.connect("expose_event", self.paint_customprogress) self.name = glade.get_widget("summary_name") self.total_size = glade.get_widget("summary_total_size") self.num_files = glade.get_widget("summary_num_files") @@ -58,7 +61,57 @@ class DetailsTabManager(object): self.next_announce = glade.get_widget("summary_next_announce") self.eta = glade.get_widget("summary_eta") self.torrent_path = glade.get_widget("summary_torrent_path") - + self.advanced_progressbar=glade.get_widget("advanced_progressbar") + self.last_state=None + self.prefchanged_progress() + self.manager.config.onValueChanged('use_advanced_bar',self.prefchanged_progress) + + def prefchanged_progress(self): + self.use_advanced_bar=self.manager.config.get("use_advanced_bar") + if self.use_advanced_bar: + self.progress_bar.hide() + self.advanced_progressbar.show() + else: + self.progress_bar.show() + self.advanced_progressbar.hide() + + def paint_customprogress(self,arg1=None,arg2=None): + # Draw the custom progress bar + progress_window=self.custom_progress.window + colormap=self.custom_progress.get_colormap() + gc=progress_window.new_gc() + size=progress_window.get_size() + progress_window.begin_paint_rect(gtk.gdk.Rectangle(0,0,size[0],size[1])) + height=size[1] + if height>25: height=25 + top=(size[1]-height)/2 + gc.set_foreground(colormap.alloc_color('#F0F0FF')) + progress_window.draw_rectangle(gc,True,0,top,size[0],height-1) + gc.set_foreground(colormap.alloc_color('#A0A0AF')) + progress_window.draw_line(gc,0,top+4,size[0],top+4) + state=self.last_state + if state!=None: + gc.set_foreground(colormap.alloc_color('#2020FF')) + progress_window.draw_rectangle(gc,True,0,top,int(size[0]*float(state['progress'])),4) + num_pieces=state["num_pieces"] + for pieces_range in state['pieces']: + range_first=pieces_range[0]*size[0]/num_pieces + range_length=((pieces_range[1]-pieces_range[0]+1)*size[0]/num_pieces) + if range_length==0: + range_length=1 + gc.set_foreground(colormap.alloc_color('#8080FF')) + else: + gc.set_foreground(colormap.alloc_color('#2020FF')) + progress_window.draw_rectangle(gc,True,range_first,top+5,range_length,height-5) + gc.set_foreground(colormap.alloc_color('dim gray')) + progress_window.draw_line(gc,0,top,0,top+height) + progress_window.draw_line(gc,0,top,size[0],top) + gc.set_foreground(colormap.alloc_color('white')) + progress_window.draw_line(gc,0,top+height,size[0]-1,top+height) + progress_window.draw_line(gc,size[0]-1,top,size[0]-1,top+height) + progress_window.end_paint() + # Done drawing custom progress bar + def update(self, unique_id): state = self.manager.get_torrent_state(unique_id) @@ -108,9 +161,13 @@ class DetailsTabManager(object): self.upload_speed.set_text(common.fspeed(state["upload_rate"])) self.seeders.set_text(common.fseed(state)) self.peers.set_text(common.fpeer(state)) - self.progress_bar.set_fraction(float(state['progress'])) - self.progress_bar.set_text(common.fpcnt(state["progress"])) - self.eta.set_text(common.estimate_eta(state)) + self.last_state=state + if self.use_advanced_bar: + self.paint_customprogress() + else: + self.progress_bar.set_fraction(float(state['progress'])) + self.progress_bar.set_text(common.fpcnt(state["progress"])) + self.share_ratio.set_text( '%.3f' % self.manager.calc_ratio(unique_id, state)) self.torrent_path.set_text(self.manager.get_torrent_path(unique_id))