Ticket #4397: 0003-ViewSource-add-ellipsize-to-the-Title-label-SL-4397.patch

File 0003-ViewSource-add-ellipsize-to-the-Title-label-SL-4397.patch, 1.4 KB (added by manuq, 10 years ago)
  • src/jarabe/view/viewsource.py

    From aeba042ce01a7a391730b0199d49df46c95bb959 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Thu, 24 Jan 2013 10:30:24 -0300
    Subject: [PATCH shell 3/3] ViewSource: add ellipsize to the Title label - SL
     #4397
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    Otherwise the Stop button can drop outside the toolbar of the
    ViewSource view.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     src/jarabe/view/viewsource.py | 10 +++-------
     1 file changed, 3 insertions(+), 7 deletions(-)
    
    diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
    index 07ddbb1..9533867 100644
    a b class Toolbar(Gtk.Toolbar): 
    420420        self.label = Gtk.Label()
    421421        self.label.set_markup('<b>%s</b>' % self.activity_title_text)
    422422        self.label.set_alignment(0, 0.5)
    423         self._add_widget(self.label)
    424 
    425         separator = Gtk.SeparatorToolItem()
    426         separator.props.draw = False
    427         separator.set_expand(True)
    428         self.insert(separator, -1)
    429         separator.show()
     423        self.label.set_line_wrap(False)
     424        self.label.set_ellipsize(Pango.EllipsizeMode.END)
     425        self._add_widget(self.label, expand=True)
    430426
    431427        stop = ToolButton(icon_name='dialog-cancel')
    432428        stop.set_tooltip(_('Close'))