mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-14 05:26:28 +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
|
import gtk, gtk.glade
|
||||||
|
from xml.sax.saxutils import escape as xml_escape
|
||||||
|
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
@ -103,12 +104,13 @@ class DetailsTab(Tab):
|
|||||||
txt = widget[1](*args)
|
txt = widget[1](*args)
|
||||||
else:
|
else:
|
||||||
txt = status[widget[2][0]]
|
txt = status[widget[2][0]]
|
||||||
|
txt = xml_escape(txt)
|
||||||
|
|
||||||
if widget[0].get_text() != txt:
|
if widget[0].get_text() != txt:
|
||||||
if widget[2][0] == 'comment' and is_url(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:
|
else:
|
||||||
widget[0].set_markup(txt.replace('&', '&'))
|
widget[0].set_markup(txt)
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
for widget in self.label_widgets:
|
for widget in self.label_widgets:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user