[hamster-applet] avoid truncation + ellipsis breaking the escaped pango (instead truncate, then escape, then add elli
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] avoid truncation + ellipsis breaking the escaped pango (instead truncate, then escape, then add elli
- Date: Fri, 13 May 2011 19:48:27 +0000 (UTC)
commit 0be6581f814134e7a5af754744a7edefed8a2c15
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri May 13 22:47:44 2011 +0300
avoid truncation + ellipsis breaking the escaped pango (instead truncate, then escape, then add ellipsis). fixes bug Bug 640730.
src/hamster/applet.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/hamster/applet.py b/src/hamster/applet.py
index d3261df..b6dd251 100755
--- a/src/hamster/applet.py
+++ b/src/hamster/applet.py
@@ -83,11 +83,12 @@ class PanelButton(gtk.ToggleButton):
self.set_property('active', is_active)
def set_text(self, activity, duration):
- activity = stuff.escape_pango(activity)
+ label = stuff.escape_pango(activity)
+
if len(activity) > 25: #ellipsize at some random length
- activity = "%s%s" % (activity[:25], "…")
+ label = "%s%s" % (stuff.escape_pango(activity[:25]), "…")
- self.activity = activity
+ self.activity = label
self.duration = duration
self.reformat_label()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]