From 5f657fdd7a25740a96c6a6b3b6e3a6ac02b70ef4 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 26 Jun 2007 03:56:47 +0000 Subject: [PATCH] we want efficient torrents, so added capability for smaller piece sizes --- plugins/TorrentCreator/torrentcreator.glade | 116 ++++++++++---------- src/core.py | 4 +- 2 files changed, 62 insertions(+), 58 deletions(-) diff --git a/plugins/TorrentCreator/torrentcreator.glade b/plugins/TorrentCreator/torrentcreator.glade index b5f93bc42..813a0260e 100644 --- a/plugins/TorrentCreator/torrentcreator.glade +++ b/plugins/TorrentCreator/torrentcreator.glade @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -70,28 +70,16 @@ 2 2 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Folder: + 0 + True + True - 1 - 2 - 1 - 2 - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER - - - 1 - 2 - GTK_FILL @@ -112,16 +100,28 @@ - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Folder: - 0 - True - True + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + 1 + 2 + GTK_FILL + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 1 + 2 @@ -169,22 +169,14 @@ 1 3 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Save Torrent File As: - - - GTK_FILL + 1 + 2 @@ -212,14 +204,22 @@ - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 5 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Save Torrent File As: + + - 1 - 2 + GTK_FILL @@ -414,21 +414,6 @@ 1 2 10 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 256 KiB -512 KiB -1024 KiB - - - 1 - 2 - GTK_FILL - - - True @@ -440,6 +425,25 @@ + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 32 KiB +64 KiB +128 KiB +256 KiB +512 KiB +1024 KiB + + + + 1 + 2 + GTK_FILL + + + diff --git a/src/core.py b/src/core.py index 578a23a33..8e6a9e078 100644 --- a/src/core.py +++ b/src/core.py @@ -781,8 +781,8 @@ class Manager: def create_torrent(self, filename, source_directory, trackers, comments=None, - pieces=256, author="Deluge"): - return deluge_core.create_torrent(filename, source_directory, trackers, comments, pieces, author) + piece_size=32, author="Deluge"): + return deluge_core.create_torrent(filename, source_directory, trackers, comments, piece_size, author) # Creates/resets the IP filter list def reset_ip_filter(self):