Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-11-04 08:09:10 (GMT)
committer Sascha Silbe <silbe@activitycentral.com>2011-11-22 12:28:57 (GMT)
commitb213493bd336852604cb30c5d3ea1c4b2526c7bb (patch)
treee4eaf4dd1f7c933eaedca231c7ec7d80c0428f23
parent20017cc4e65a3e23943a3a605b3b4f5427d5729d (diff)
_TimeoutIcon: use markup instead of Pango for bold text
In Pango 'Pango.attr_weight_new' is not yet introspectable [1]. [1] https://bugzilla.gnome.org/show_bug.cgi?id=646788 [changed description] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
-rw-r--r--src/sugar3/graphics/alert.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py
index fb4ca38..ed95829 100644
--- a/src/sugar3/graphics/alert.py
+++ b/src/sugar3/graphics/alert.py
@@ -49,7 +49,6 @@ import gettext
from gi.repository import Gtk
from gi.repository import GObject
-from gi.repository import Pango
import math
from sugar3.graphics import style
@@ -346,9 +345,6 @@ class _TimeoutIcon(Gtk.Alignment):
self.set_app_paintable(True)
self._text = Gtk.Label()
self._text.set_alignment(0.5, 0.5)
- attrlist = Pango.AttrList()
- attrlist.insert(Pango.AttrWeight(Pango.Weight.BOLD))
- self._text.set_attributes(attrlist)
self.add(self._text)
self._text.show()
self.connect('draw', self.__draw_cb)
@@ -375,7 +371,7 @@ class _TimeoutIcon(Gtk.Alignment):
context.fill_preserve()
def set_text(self, text):
- self._text.set_text(str(text))
+ self._text.set_markup('<b>%s</b>' % str(text))
class TimeoutAlert(Alert):