[hamster-applet] escape pango - fixes bug 634312



commit 4ab6d2368fbef605b5d840e10df4b8600bc60107
Author: Toms Bauģis <toms baugis gmail com>
Date:   Mon Nov 8 12:49:27 2010 +0000

    escape pango - fixes bug 634312

 src/hamster/utils/charting.py |    4 ++--
 src/hamster/widgets/tags.py   |    7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/hamster/utils/charting.py b/src/hamster/utils/charting.py
index ba5f5b2..e5d68d6 100644
--- a/src/hamster/utils/charting.py
+++ b/src/hamster/utils/charting.py
@@ -21,7 +21,7 @@ import gtk, gobject
 import pango
 import datetime as dt
 import time
-import graphics
+import graphics, stuff
 import locale
 
 class Bar(graphics.Sprite):
@@ -138,7 +138,7 @@ class Chart(graphics.Scene):
                 self.tweener.add_tween(bar, normalized=normalized)
             new_bars.append(bar)
 
-            label = graphics.Label(key, size = 8, alignment = pango.ALIGN_RIGHT)
+            label = graphics.Label(stuff.escape_pango(key), size = 8, alignment = pango.ALIGN_RIGHT)
             new_labels.append(label)
 
 
diff --git a/src/hamster/widgets/tags.py b/src/hamster/widgets/tags.py
index 32af4d7..421863b 100644
--- a/src/hamster/widgets/tags.py
+++ b/src/hamster/widgets/tags.py
@@ -21,7 +21,7 @@ import gtk, gobject
 import pango, cairo
 from math import pi
 
-from ..utils import graphics
+from ..utils import graphics, stuff
 from ..configuration import runtime
 
 class TagsEntry(gtk.Entry):
@@ -312,12 +312,11 @@ class Tag(graphics.Sprite):
     def __init__(self, text, interactive = True, color = "#F1EAAA"):
         graphics.Sprite.__init__(self, interactive = interactive)
 
-        self.text = text
-
+        self.text = stuff.escape_pango(text)
         font = gtk.Style().font_desc
         font_size = int(font.get_size() * 0.8 / pango.SCALE) # 80% of default
 
-        label = graphics.Label(text, size = font_size, color = (30, 30, 30), y = 1)
+        label = graphics.Label(self.text, size = font_size, color = (30, 30, 30), y = 1)
 
         corner = int((label.height + 3) / 3) + 0.5
         label.x = corner + 6



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]