diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-08-23 18:06:49 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-08-25 15:50:14 (GMT) |
commit | 64f20059b2591cac2f03b16973d96e07f66b5bea (patch) | |
tree | b546d547d71218808121ce59f85360353ef2b743 /src | |
parent | 14ecfd94ae6cf5dd56167c1c720cc1c2b315a08a (diff) |
Do not fail on bad markup strings
Diffstat (limited to 'src')
-rw-r--r-- | src/jarabe/journal/thumbsview.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/jarabe/journal/thumbsview.py b/src/jarabe/journal/thumbsview.py index 3ebbfcf..30ef4b9 100644 --- a/src/jarabe/journal/thumbsview.py +++ b/src/jarabe/journal/thumbsview.py @@ -14,8 +14,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +import sys import gobject import hippo +import pango from sugar.graphics import style from sugar.graphics.icon import CanvasIcon @@ -106,8 +108,15 @@ class ThumbsCell(TableCell, hippo.CanvasBox): main_box.append(self.date) def do_fill_in(self): - self.title.props.markup = \ - '<b>%s</b>' % self.row[Source.FIELD_TITLE] or '' + title_weight = pango.AttrWeight(pango.WEIGHT_BOLD) + title_weight.start_index = 0 + title_weight.end_index = sys.maxint + title_attributes = pango.AttrList() + title_attributes.insert(title_weight) + + self.title.props.attributes = title_attributes + self.title.props.text = self.row[Source.FIELD_TITLE] or '' + self.date.props.text = self.row[Source.FIELD_MODIFY_TIME] or '' self.keep.props.keep = int(self.row[Source.FIELD_KEEP] or 0) == 1 |