From 2d5f6227a0a6c57ac4058bc68852df4e61c70eef Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann <humitos@gmail.com>
Date: Tue, 6 Nov 2012 16:13:52 +0000
Subject: [PATCH Words] Use 'ellipsize' to avoid screen overflow SL #4107
Set 'Pango.EllipsizeMode.END' to both CellRendererText to its
rows don't use more space than the width of the screen when we
search for a word.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
---
wordsactivity.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/wordsactivity.py b/wordsactivity.py
index 7abc51a..f23480e 100644
a
|
b
|
class WordsActivity(activity.Activity): |
164 | 164 | lang1view = Gtk.TreeView(self.lang1model) |
165 | 165 | lang1view.set_headers_visible(False) |
166 | 166 | lang1cell = Gtk.CellRendererText() |
| 167 | lang1cell.props.ellipsize_set = True |
| 168 | lang1cell.props.ellipsize = Pango.EllipsizeMode.END |
167 | 169 | lang1treecol = Gtk.TreeViewColumn("", lang1cell, text=0) |
168 | 170 | lang1view.get_selection().connect("changed", self.lang1sel_cb) |
169 | 171 | lang1view.append_column(lang1treecol) |
… |
… |
class WordsActivity(activity.Activity): |
176 | 178 | lang2view = Gtk.TreeView(self.lang2model) |
177 | 179 | lang2view.set_headers_visible(False) |
178 | 180 | lang2cell = Gtk.CellRendererText() |
| 181 | lang2cell.props.ellipsize_set = True |
| 182 | lang2cell.props.ellipsize = Pango.EllipsizeMode.END |
179 | 183 | lang2treecol = Gtk.TreeViewColumn("", lang2cell, text=0) |
180 | 184 | lang2view.get_selection().connect("changed", self.lang2sel_cb) |
181 | 185 | lang2view.append_column(lang2treecol) |