Ticket #850: clickable-url-in-comments-field.patch
File clickable-url-in-comments-field.patch, 1.4 KB (added by , 15 years ago) |
---|
-
deluge/ui/gtkui/details_tab.py
38 38 39 39 from deluge.ui.client import client 40 40 import deluge.component as component 41 import deluge.common 41 from deluge.common import fsize, is_url 42 42 from deluge.ui.gtkui.torrentdetails import Tab 43 43 44 44 from deluge.log import LOG as log … … 56 56 57 57 self.label_widgets = [ 58 58 (glade.get_widget("summary_name"), None, ("name",)), 59 (glade.get_widget("summary_total_size"), deluge.common.fsize, ("total_size",)),59 (glade.get_widget("summary_total_size"), fsize, ("total_size",)), 60 60 (glade.get_widget("summary_num_files"), str, ("num_files",)), 61 61 (glade.get_widget("summary_tracker"), None, ("tracker",)), 62 62 (glade.get_widget("summary_torrent_path"), None, ("save_path",)), … … 104 104 txt = status[widget[2][0]] 105 105 106 106 if widget[0].get_text() != txt: 107 widget[0].set_text(txt) 107 if widget[2][0] == 'comment' and is_url(txt): 108 widget[0].set_markup('<a href="%s">%s</a>' % (txt, txt)) 109 else: 110 widget[0].set_markup(txt) 108 111 109 112 def clear(self): 110 113 for widget in self.label_widgets: