mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
Add 'Comments' field to the Details tab
This commit is contained in:
parent
027dd7bcef
commit
97fec6ce1a
4 changed files with 699 additions and 664 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
=== Deluge 1.1.5 - (In Development) ===
|
||||||
|
==== Core ====
|
||||||
|
* Fix config file saving when no current config file exists
|
||||||
|
|
||||||
|
==== GtkUI ====
|
||||||
|
* Add 'Comments' field to the Details tab
|
||||||
|
|
||||||
=== Deluge 1.1.4 - (08 March 2009) ===
|
=== Deluge 1.1.4 - (08 March 2009) ===
|
||||||
==== Core ====
|
==== Core ====
|
||||||
* Fix displaying file errors when the torrent isn't paused
|
* Fix displaying file errors when the torrent isn't paused
|
||||||
|
|
|
@ -604,6 +604,14 @@ class Torrent:
|
||||||
"time_added": self.time_added
|
"time_added": self.time_added
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def ti_comment():
|
||||||
|
if self.handle.has_metadata():
|
||||||
|
try:
|
||||||
|
return self.torrent_info.comment().decode("utf8", "ignore")
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
return self.torrent_info.comment()
|
||||||
|
return ""
|
||||||
|
|
||||||
def ti_name():
|
def ti_name():
|
||||||
if self.handle.has_metadata():
|
if self.handle.has_metadata():
|
||||||
try:
|
try:
|
||||||
|
@ -634,6 +642,7 @@ class Torrent:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
fns = {
|
fns = {
|
||||||
|
"comment": ti_comment,
|
||||||
"name": ti_name,
|
"name": ti_name,
|
||||||
"private": ti_priv,
|
"private": ti_priv,
|
||||||
"total_size": ti_total_size,
|
"total_size": ti_total_size,
|
||||||
|
|
|
@ -50,7 +50,8 @@ class DetailsTab(Tab):
|
||||||
(glade.get_widget("summary_tracker"), None, ("tracker",)),
|
(glade.get_widget("summary_tracker"), None, ("tracker",)),
|
||||||
(glade.get_widget("summary_torrent_path"), None, ("save_path",)),
|
(glade.get_widget("summary_torrent_path"), None, ("save_path",)),
|
||||||
(glade.get_widget("summary_message"), str, ("message",)),
|
(glade.get_widget("summary_message"), str, ("message",)),
|
||||||
(glade.get_widget("summary_hash"), str, ("hash",))
|
(glade.get_widget("summary_hash"), str, ("hash",)),
|
||||||
|
(glade.get_widget("summary_comments"), str, ("comment",))
|
||||||
]
|
]
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
|
@ -67,7 +68,7 @@ class DetailsTab(Tab):
|
||||||
|
|
||||||
# Get the torrent status
|
# Get the torrent status
|
||||||
status_keys = ["name", "total_size", "num_files",
|
status_keys = ["name", "total_size", "num_files",
|
||||||
"tracker", "save_path", "message", "hash"]
|
"tracker", "save_path", "message", "hash", "comment"]
|
||||||
|
|
||||||
client.get_torrent_status(
|
client.get_torrent_status(
|
||||||
self._on_get_torrent_status, selected, status_keys)
|
self._on_get_torrent_status, selected, status_keys)
|
||||||
|
@ -98,4 +99,3 @@ class DetailsTab(Tab):
|
||||||
def clear(self):
|
def clear(self):
|
||||||
for widget in self.label_widgets:
|
for widget in self.label_widgets:
|
||||||
widget[0].set_text("")
|
widget[0].set_text("")
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue