Get markup text as default

Now sugar-toolkit get markup (glib.markup_escape_text) and
set it.

This fixes SL#4456
This commit is contained in:
Ignacio Rodríguez 2014-12-12 18:37:22 -02:00 committed by Gonzalo Odiard
parent cbc7158ecd
commit cef1ad7590

View File

@ -24,6 +24,7 @@ STABLE.
""" """
import textwrap import textwrap
from gi.repository import GLib
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
from gi.repository import GObject from gi.repository import GObject
@ -247,8 +248,8 @@ class Palette(PaletteWindow):
def set_primary_text(self, label, accel_path=None): def set_primary_text(self, label, accel_path=None):
self._primary_text = label self._primary_text = label
if label is not None: if label is not None:
label = GLib.markup_escape_text(label)
self._label.set_markup('<b>%s</b>' % label) self._label.set_markup('<b>%s</b>' % label)
self._label.show() self._label.show()