Ticket #4107: 0001-Use-ellipsize-to-avoid-screen-overflow-SL-4107.patch

File 0001-Use-ellipsize-to-avoid-screen-overflow-SL-4107.patch, 1.6 KB (added by humitos, 11 years ago)

Patch for 'origin/Gtk3' branch

  • wordsactivity.py

    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): 
    164164        lang1view = Gtk.TreeView(self.lang1model)
    165165        lang1view.set_headers_visible(False)
    166166        lang1cell = Gtk.CellRendererText()
     167        lang1cell.props.ellipsize_set = True
     168        lang1cell.props.ellipsize = Pango.EllipsizeMode.END
    167169        lang1treecol = Gtk.TreeViewColumn("", lang1cell, text=0)
    168170        lang1view.get_selection().connect("changed", self.lang1sel_cb)
    169171        lang1view.append_column(lang1treecol)
    class WordsActivity(activity.Activity): 
    176178        lang2view = Gtk.TreeView(self.lang2model)
    177179        lang2view.set_headers_visible(False)
    178180        lang2cell = Gtk.CellRendererText()
     181        lang2cell.props.ellipsize_set = True
     182        lang2cell.props.ellipsize = Pango.EllipsizeMode.END
    179183        lang2treecol = Gtk.TreeViewColumn("", lang2cell, text=0)
    180184        lang2view.get_selection().connect("changed", self.lang2sel_cb)
    181185        lang2view.append_column(lang2treecol)