[hamster-applet/gnome-2-32] escape pango - fixes bug 634312



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

    escape pango - fixes bug 634312

 src/hamster/charting.py     |    4 ++--
 src/hamster/widgets/tags.py |    7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/hamster/charting.py b/src/hamster/charting.py
index c873245..001e808 100644
--- a/src/hamster/charting.py
+++ b/src/hamster/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):
@@ -139,7 +139,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 67b743a..3f8ccea 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 .. import graphics
+from .. 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 = 2)
+        label = graphics.Label(self.text, size = font_size, color = (30, 30, 30), y = 2)
 
         corner = (label.height + 3) / 3
         label.x = corner + 6



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