Fix remote save path dialog not disappearing after creating a torrent

This commit is contained in:
John Garland 2010-05-16 18:10:13 +10:00
parent fc96e9d02c
commit 8e5aab660c
1 changed files with 4 additions and 2 deletions

View File

@ -228,11 +228,14 @@ class CreateTorrentDialog:
is_remote = self.files_treestore[0][1] == gtk.STOCK_NETWORK is_remote = self.files_treestore[0][1] == gtk.STOCK_NETWORK
if is_remote: if is_remote:
# This is a remote path # This is a remote path
response = self.glade.get_widget("remote_save_dialog").run() dialog = self.glade.get_widget("remote_save_dialog")
response = dialog.run()
if response == gtk.RESPONSE_OK: if response == gtk.RESPONSE_OK:
result = self.glade.get_widget("entry_save_path").get_text() result = self.glade.get_widget("entry_save_path").get_text()
else: else:
dialog.hide()
return return
dialog.hide()
else: else:
# Setup the filechooserdialog # Setup the filechooserdialog
chooser = gtk.FileChooserDialog(_("Save .torrent file"), chooser = gtk.FileChooserDialog(_("Save .torrent file"),
@ -344,7 +347,6 @@ class CreateTorrentDialog:
trackers, trackers,
add_to_session).addCallback(hide_progress) add_to_session).addCallback(hide_progress)
chooser.destroy()
self.dialog.destroy() self.dialog.destroy()
def create_torrent(self, path, tracker, piece_length, progress, comment, target, def create_torrent(self, path, tracker, piece_length, progress, comment, target,