From a2b2ce2ca5cb07fc9544dd8913d4f6426916cdd4 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 23 Oct 2008 13:23:26 +0000 Subject: [PATCH] Fix saving files in create torrent dialog, also set a default filename when saving --- deluge/ui/gtkui/createtorrentdialog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deluge/ui/gtkui/createtorrentdialog.py b/deluge/ui/gtkui/createtorrentdialog.py index b27fbc1ef..0ec96bf52 100644 --- a/deluge/ui/gtkui/createtorrentdialog.py +++ b/deluge/ui/gtkui/createtorrentdialog.py @@ -234,6 +234,7 @@ class CreateTorrentDialog: file_filter.add_pattern("*") chooser.add_filter(file_filter) + chooser.set_current_name(os.path.split(self.files_treestore[0][0])[-1] + ".torrent") # Run the dialog response = chooser.run() @@ -242,6 +243,7 @@ class CreateTorrentDialog: else: chooser.destroy() return + chooser.destroy() # Fix up torrent filename if len(result) < 9: @@ -254,6 +256,7 @@ class CreateTorrentDialog: # Get a list of trackers trackers = [t[1] for t in self.trackers_liststore] if len(trackers) == 0: + self.dialog.destroy() return # Get a list of webseeds webseeds = []