Fix saving files in create torrent dialog, also set a default filename
when saving
This commit is contained in:
parent
ecb80ea689
commit
a2b2ce2ca5
|
@ -234,6 +234,7 @@ class CreateTorrentDialog:
|
||||||
file_filter.add_pattern("*")
|
file_filter.add_pattern("*")
|
||||||
chooser.add_filter(file_filter)
|
chooser.add_filter(file_filter)
|
||||||
|
|
||||||
|
chooser.set_current_name(os.path.split(self.files_treestore[0][0])[-1] + ".torrent")
|
||||||
# Run the dialog
|
# Run the dialog
|
||||||
response = chooser.run()
|
response = chooser.run()
|
||||||
|
|
||||||
|
@ -242,6 +243,7 @@ class CreateTorrentDialog:
|
||||||
else:
|
else:
|
||||||
chooser.destroy()
|
chooser.destroy()
|
||||||
return
|
return
|
||||||
|
chooser.destroy()
|
||||||
|
|
||||||
# Fix up torrent filename
|
# Fix up torrent filename
|
||||||
if len(result) < 9:
|
if len(result) < 9:
|
||||||
|
@ -254,6 +256,7 @@ class CreateTorrentDialog:
|
||||||
# Get a list of trackers
|
# Get a list of trackers
|
||||||
trackers = [t[1] for t in self.trackers_liststore]
|
trackers = [t[1] for t in self.trackers_liststore]
|
||||||
if len(trackers) == 0:
|
if len(trackers) == 0:
|
||||||
|
self.dialog.destroy()
|
||||||
return
|
return
|
||||||
# Get a list of webseeds
|
# Get a list of webseeds
|
||||||
webseeds = []
|
webseeds = []
|
||||||
|
|
Loading…
Reference in New Issue