mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +00:00
[#2772] [GTKUI] Fix GtkWarning with unknown pango markup
This commit is contained in:
parent
4b9dcf377c
commit
86b1b75fb8
@ -35,6 +35,7 @@
|
||||
|
||||
|
||||
import gtk, gtk.glade
|
||||
from xml.sax.saxutils import escape as xml_escape
|
||||
|
||||
from deluge.ui.client import client
|
||||
import deluge.component as component
|
||||
@ -103,12 +104,13 @@ class DetailsTab(Tab):
|
||||
txt = widget[1](*args)
|
||||
else:
|
||||
txt = status[widget[2][0]]
|
||||
txt = xml_escape(txt)
|
||||
|
||||
if widget[0].get_text() != txt:
|
||||
if widget[2][0] == 'comment' and is_url(txt):
|
||||
widget[0].set_markup('<a href="%s">%s</a>' % (txt, txt.replace('&', '&')))
|
||||
widget[0].set_markup('<a href="%s">%s</a>' % (txt, txt))
|
||||
else:
|
||||
widget[0].set_markup(txt.replace('&', '&'))
|
||||
widget[0].set_markup(txt)
|
||||
|
||||
def clear(self):
|
||||
for widget in self.label_widgets:
|
||||
|
Loading…
x
Reference in New Issue
Block a user