mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
Fix #768 save tracker list for create torrent dialog
This commit is contained in:
parent
4bd00aa331
commit
cc3f3495b6
3 changed files with 11 additions and 4 deletions
|
@ -31,6 +31,7 @@
|
|||
* Fix #594 tray password dialog freeze in Windows
|
||||
* Made the password dialog prettier
|
||||
* Fix #1086 deprecated gtk.Tooltips usage
|
||||
* Fix #768 save tracker list for create torrent dialog
|
||||
|
||||
==== Console ====
|
||||
* Fix using the console in Windows, but only in command-line mode
|
||||
|
|
|
@ -118,7 +118,7 @@ class CreateTorrentDialog:
|
|||
psize = int(psize) * 1024
|
||||
if metric[0] == 'M':
|
||||
psize *= 1024
|
||||
|
||||
|
||||
return psize
|
||||
|
||||
def adjust_piece_size(self):
|
||||
|
@ -322,7 +322,7 @@ class CreateTorrentDialog:
|
|||
|
||||
def hide_progress(result):
|
||||
self.glade.get_widget("progress_dialog").hide_all()
|
||||
|
||||
|
||||
deferToThread(self.create_torrent,
|
||||
path,
|
||||
tracker,
|
||||
|
@ -389,7 +389,10 @@ class CreateTorrentDialog:
|
|||
dialog = glade.get_widget("add_tracker_dialog")
|
||||
dialog.set_transient_for(self.dialog)
|
||||
textview = glade.get_widget("textview_trackers")
|
||||
textview.get_buffer().set_text("")
|
||||
if self.config["createtorrent.trackers"]:
|
||||
textview.get_buffer().set_text("\n".join(self.config["createtorrent.trackers"]))
|
||||
else:
|
||||
textview.get_buffer().set_text("")
|
||||
textview.grab_focus()
|
||||
response = dialog.run()
|
||||
|
||||
|
@ -398,6 +401,8 @@ class CreateTorrentDialog:
|
|||
trackers = []
|
||||
b = textview.get_buffer()
|
||||
lines = b.get_text(b.get_start_iter(), b.get_end_iter()).strip().split("\n")
|
||||
self.config["createtorrent.trackers"] = lines
|
||||
log.debug("lines: %s", lines)
|
||||
for l in lines:
|
||||
if deluge.common.is_url(l):
|
||||
trackers.append(l)
|
||||
|
|
|
@ -152,7 +152,8 @@ DEFAULT_PREFS = {
|
|||
"sidebar_show_zero": False,
|
||||
"sidebar_show_trackers": True,
|
||||
"sidebar_position": 170,
|
||||
"show_rate_in_title": False
|
||||
"show_rate_in_title": False,
|
||||
"createtorrent.trackers": []
|
||||
}
|
||||
|
||||
class GtkUI(object):
|
||||
|
|
Loading…
Add table
Reference in a new issue