mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +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
|
* Fix #594 tray password dialog freeze in Windows
|
||||||
* Made the password dialog prettier
|
* Made the password dialog prettier
|
||||||
* Fix #1086 deprecated gtk.Tooltips usage
|
* Fix #1086 deprecated gtk.Tooltips usage
|
||||||
|
* Fix #768 save tracker list for create torrent dialog
|
||||||
|
|
||||||
==== Console ====
|
==== Console ====
|
||||||
* Fix using the console in Windows, but only in command-line mode
|
* Fix using the console in Windows, but only in command-line mode
|
||||||
|
|
|
@ -389,6 +389,9 @@ class CreateTorrentDialog:
|
||||||
dialog = glade.get_widget("add_tracker_dialog")
|
dialog = glade.get_widget("add_tracker_dialog")
|
||||||
dialog.set_transient_for(self.dialog)
|
dialog.set_transient_for(self.dialog)
|
||||||
textview = glade.get_widget("textview_trackers")
|
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.get_buffer().set_text("")
|
||||||
textview.grab_focus()
|
textview.grab_focus()
|
||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
|
@ -398,6 +401,8 @@ class CreateTorrentDialog:
|
||||||
trackers = []
|
trackers = []
|
||||||
b = textview.get_buffer()
|
b = textview.get_buffer()
|
||||||
lines = b.get_text(b.get_start_iter(), b.get_end_iter()).strip().split("\n")
|
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:
|
for l in lines:
|
||||||
if deluge.common.is_url(l):
|
if deluge.common.is_url(l):
|
||||||
trackers.append(l)
|
trackers.append(l)
|
||||||
|
|
|
@ -152,7 +152,8 @@ DEFAULT_PREFS = {
|
||||||
"sidebar_show_zero": False,
|
"sidebar_show_zero": False,
|
||||||
"sidebar_show_trackers": True,
|
"sidebar_show_trackers": True,
|
||||||
"sidebar_position": 170,
|
"sidebar_position": 170,
|
||||||
"show_rate_in_title": False
|
"show_rate_in_title": False,
|
||||||
|
"createtorrent.trackers": []
|
||||||
}
|
}
|
||||||
|
|
||||||
class GtkUI(object):
|
class GtkUI(object):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue