Ticket #308: sugar-308.patch

File sugar-308.patch, 3.0 KB (added by alsroot, 15 years ago)
  • extensions/cpsection/keyboard/view.py

    From 8490f90e11cf8ed438309b8e16c9910b77f3f404 Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Mon, 21 Sep 2009 23:09:52 +0000
    Subject: Control panel resizing issue (for non en_US languages) #308
    
    ---
     extensions/cpsection/keyboard/view.py |    6 ++++++
     extensions/cpsection/language/view.py |    7 ++++++-
     2 files changed, 12 insertions(+), 1 deletions(-)
    
    diff --git a/extensions/cpsection/keyboard/view.py b/extensions/cpsection/keyboard/view.py
    index 5527cc8..dd62a85 100644
    a b class LayoutCombo(gtk.HBox): 
    7474            self._klang_combo.connect('changed', self._klang_combo_changed_cb)
    7575        cell = gtk.CellRendererText()
    7676        cell.props.ellipsize = pango.ELLIPSIZE_MIDDLE
     77        cell.props.ellipsize_set = True
    7778        self._klang_combo.pack_start(cell)
    7879        self._klang_combo.add_attribute(cell, 'text', 1)
    7980        self.pack_start(self._klang_combo, expand=True, fill = True)
    class LayoutCombo(gtk.HBox): 
    8586                                self._kvariant_combo_changed_cb)
    8687        cell = gtk.CellRendererText()
    8788        cell.props.ellipsize = pango.ELLIPSIZE_MIDDLE
     89        cell.props.ellipsize_set = True
    8890        self._kvariant_combo.pack_start(cell)
    8991        self._kvariant_combo.add_attribute(cell, 'text', 1)
    9092        self.pack_start(self._kvariant_combo, expand=True, fill = True)
    class Keyboard(SectionView): 
    200202
    201203        kmodel_combo = gtk.ComboBox(model = kmodel_store)
    202204        cell = gtk.CellRendererText()
     205        cell.props.ellipsize = pango.ELLIPSIZE_MIDDLE
     206        cell.props.ellipsize_set = True
    203207        kmodel_combo.pack_start(cell)
    204208        kmodel_combo.add_attribute(cell, 'text', 1)
    205209
    class Keyboard(SectionView): 
    257261
    258262        group_option_combo = gtk.ComboBox(model = group_option_store)
    259263        cell = gtk.CellRendererText()
     264        cell.props.ellipsize = pango.ELLIPSIZE_MIDDLE
     265        cell.props.ellipsize_set = True
    260266        group_option_combo.pack_start(cell)
    261267        group_option_combo.add_attribute(cell, 'text', 1)
    262268
  • extensions/cpsection/language/view.py

    diff --git a/extensions/cpsection/language/view.py b/extensions/cpsection/language/view.py
    index 4489b15..d1a49cf 100644
    a b class Language(SectionView): 
    6363        self.pack_start(self._text, False)
    6464        self._text.show()
    6565
     66        scrolled = gtk.ScrolledWindow()
     67        scrolled.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
     68        scrolled.show()
     69        self.pack_start(scrolled, expand=True)
     70
    6671        self._table = gtk.Table(rows=1, columns=3, homogeneous=False)
    6772        self._table.set_border_width(style.DEFAULT_SPACING * 2)       
    68         self.pack_start(self._table, False)
    6973        self._table.show()
     74        scrolled.add_with_viewport(self._table)
    7075
    7176        self._lang_alert_box = gtk.HBox(spacing=style.DEFAULT_SPACING)
    7277        self.pack_start(self._lang_alert_box, False)