mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 01:55:15 +00:00
Fix #768 save tracker list for create torrent dialog
This commit is contained in:
parent
d1f6ca90fc
commit
a9631daf7f
@ -389,6 +389,9 @@ class CreateTorrentDialog:
|
||||
dialog = glade.get_widget("add_tracker_dialog")
|
||||
dialog.set_transient_for(self.dialog)
|
||||
textview = glade.get_widget("textview_trackers")
|
||||
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…
x
Reference in New Issue
Block a user