From 77433af5ffd02305f2c9841a13e4ad7b16e79f65 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 24 Feb 2009 10:37:30 +0100 Subject: [PATCH] Only display one line in the secondary text of a clipping palette #384 --- src/sugar/graphics/palette.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py index afc6e70d..43c5677c 100644 --- a/src/sugar/graphics/palette.py +++ b/src/sugar/graphics/palette.py @@ -188,7 +188,7 @@ class Palette(gtk.Window): if text_maxlen > 0: self._secondary_label.set_max_width_chars(text_maxlen) - self._secondary_label.set_ellipsize(pango.ELLIPSIZE_MIDDLE) + self._secondary_label.set_ellipsize(pango.ELLIPSIZE_END) labels_box.pack_start(self._secondary_label, expand=True) @@ -355,6 +355,7 @@ class Palette(gtk.Window): setter=set_primary_text) def set_secondary_text(self, label): + label = label.split('\n', 1)[0] self._secondary_text = label if label is None: