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

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

    From a13faf15bd86fca52d976a356f08fcfe043f037e Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Thu, 14 Feb 2013 12:42:32 -0300
    Subject: [PATCH 2/4] 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 d0012b6..68290ee 100644
    a b class Toolbar(Gtk.Toolbar): 
    412412        self.label = Gtk.Label()
    413413        self.label.set_markup('<b>%s</b>' % self.activity_title_text)
    414414        self.label.set_alignment(0, 0.5)
    415         self._add_widget(self.label)
    416 
    417         separator = Gtk.SeparatorToolItem()
    418         separator.props.draw = False
    419         separator.set_expand(True)
    420         self.insert(separator, -1)
    421         separator.show()
     415        self.label.set_line_wrap(False)
     416        self.label.set_ellipsize(Pango.EllipsizeMode.END)
     417        self._add_widget(self.label, expand=True)
    422418
    423419        stop = ToolButton(icon_name='dialog-cancel')
    424420        stop.set_tooltip(_('Close'))