diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-12-02 22:36:02 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-12-02 22:36:02 +0000 |
commit | 856420c6401262b9832062ec178d018e554d4d2c (patch) | |
tree | 38e3a3c93a4f9bb6a75fc717ad57d4a84a0d0da4 /plugins | |
parent | 4f55d7dfc662185adc86c62d3dbe7ab5889fc1c6 (diff) | |
download | deluge-856420c6401262b9832062ec178d018e554d4d2c.tar.gz deluge-856420c6401262b9832062ec178d018e554d4d2c.tar.bz2 deluge-856420c6401262b9832062ec178d018e554d4d2c.zip |
add web seeds to torrent creator
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TorrentCreator/__init__.py | 6 | ||||
-rw-r--r-- | plugins/TorrentCreator/torrentcreator.glade | 166 |
2 files changed, 114 insertions, 58 deletions
diff --git a/plugins/TorrentCreator/__init__.py b/plugins/TorrentCreator/__init__.py index d0869fbbe..8ad62fae7 100644 --- a/plugins/TorrentCreator/__init__.py +++ b/plugins/TorrentCreator/__init__.py @@ -133,6 +133,10 @@ class TorrentCreator: trackers = self.glade.get_widget("trackers_textview").get_buffer() (start, end) = trackers.get_bounds() trackers = trackers.get_text(start, end).strip() + + webseeds = self.glade.get_widget("webseeds_textview").get_buffer() + (start, end) = webseeds.get_bounds() + webseeds = webseeds.get_text(start, end).strip() comments = self.glade.get_widget("comments_textview").get_buffer() (start, end) = comments.get_bounds() @@ -150,7 +154,7 @@ class TorrentCreator: # Create the torrent and add it to the queue if necessary if self.core.create_torrent(torrent, source, trackers, comments, - piece_size, author, set_private) == 1: + piece_size, author, set_private, webseeds) == 1: # Torrent was created successfully if add_torrent: # We need to add this torrent to the queue diff --git a/plugins/TorrentCreator/torrentcreator.glade b/plugins/TorrentCreator/torrentcreator.glade index b329a8186..c5206079d 100644 --- a/plugins/TorrentCreator/torrentcreator.glade +++ b/plugins/TorrentCreator/torrentcreator.glade @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> -<!--Generated with glade3 3.2.2 on Thu Oct 25 22:18:52 2007 by markybob@peg--> +<!--Generated with glade3 3.4.0 on Sun Dec 2 16:02:19 2007 --> <glade-interface> <widget class="GtkDialog" id="torrentcreator"> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -54,6 +54,7 @@ <widget class="GtkFrame" id="frame2"> <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> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment2"> @@ -69,28 +70,17 @@ <property name="n_rows">2</property> <property name="n_columns">2</property> <child> - <widget class="GtkFileChooserButton" id="file_chooserbutton"> - <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> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkFileChooserButton" id="folder_chooserbutton"> + <widget class="GtkRadioButton" id="folder_radiobutton"> <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="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> + <property name="tooltip" translatable="yes">This torrent will be made from a directory</property> + <property name="label" translatable="yes">Folder:</property> + <property name="response_id">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -112,17 +102,28 @@ </packing> </child> <child> - <widget class="GtkRadioButton" id="folder_radiobutton"> + <widget class="GtkFileChooserButton" id="folder_chooserbutton"> + <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="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkFileChooserButton" id="file_chooserbutton"> <property name="visible">True</property> - <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="tooltip" translatable="yes">This torrent will be made from a directory</property> - <property name="label" translatable="yes">Folder:</property> - <property name="response_id">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> @@ -150,6 +151,7 @@ <widget class="GtkFrame" id="frame1"> <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> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment3"> @@ -169,22 +171,14 @@ <property name="n_rows">1</property> <property name="n_columns">3</property> <child> - <widget class="GtkAlignment" id="alignment8"> + <widget class="GtkEntry" id="torrentfile_entry"> <property name="visible">True</property> + <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="right_padding">5</property> - <child> - <widget class="GtkLabel" id="label2"> - <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">Save Torrent File As:</property> - </widget> - </child> </widget> <packing> - <property name="x_options">GTK_FILL</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> </packing> </child> <child> @@ -212,14 +206,22 @@ </packing> </child> <child> - <widget class="GtkEntry" id="torrentfile_entry"> + <widget class="GtkAlignment" id="alignment8"> <property name="visible">True</property> - <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="right_padding">5</property> + <child> + <widget class="GtkLabel" id="label2"> + <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">Save Torrent File As:</property> + </widget> + </child> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> </packing> </child> </widget> @@ -269,6 +271,7 @@ <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> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment4"> @@ -312,9 +315,57 @@ </packing> </child> <child> + <widget class="GtkFrame" id="frame7"> + <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> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <child> + <widget class="GtkAlignment" id="alignment10"> + <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">5</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkViewport" id="viewport5"> + <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="border_width">5</property> + <property name="resize_mode">GTK_RESIZE_QUEUE</property> + <child> + <widget class="GtkTextView" id="webseeds_textview"> + <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="wrap_mode">GTK_WRAP_CHAR</property> + <property name="accepts_tab">False</property> + </widget> + </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"><b>Web Seeds</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="position">3</property> + </packing> + </child> + <child> <widget class="GtkFrame" id="frame4"> <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> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment5"> @@ -354,13 +405,14 @@ </child> </widget> <packing> - <property name="position">3</property> + <property name="position">4</property> </packing> </child> <child> <widget class="GtkFrame" id="frame5"> <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> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment6"> @@ -391,7 +443,7 @@ </widget> <packing> <property name="expand">False</property> - <property name="position">4</property> + <property name="position">5</property> </packing> </child> <child> @@ -416,17 +468,15 @@ <placeholder/> </child> <child> - <widget class="GtkCheckButton" id="chk_set_priv"> + <widget class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes">Set Private Flag</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> + <property name="tooltip" translatable="yes">The smaller the piece sizes, the more efficient the transfers will be, but the actual ".torrent" file will be larger</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Piece Size:</property> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="y_options"></property> </packing> </child> <child> @@ -451,15 +501,17 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label3"> + <widget class="GtkCheckButton" id="chk_set_priv"> <property name="visible">True</property> + <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="tooltip" translatable="yes">The smaller the piece sizes, the more efficient the transfers will be, but the actual ".torrent" file will be larger</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Piece Size:</property> + <property name="label" translatable="yes">Set Private Flag</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="y_options"></property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> </packing> </child> </widget> @@ -481,7 +533,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">5</property> + <property name="position">6</property> </packing> </child> </widget> |