Ticket #3902: 0001-Fix-layout-of-Language-and-Modem-sections-in-the-Con.patch

File 0001-Fix-layout-of-Language-and-Modem-sections-in-the-Con.patch, 2.5 KB (added by manuq, 12 years ago)

Candidate patch

  • extensions/cpsection/language/view.py

    From 0c46c02ffefc328a037d3a643bbcccde02097e9d Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Mon, 24 Sep 2012 20:51:53 -0300
    Subject: [PATCH shell 1/2] Fix layout of Language and Modem sections in the
     Control Panel - SL #3902
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    - Use hide() instead of hide_all() which doesn't exist in pygobject.
    
    - Remove the set_width_chars(100) of the explanation label.  Forcing
      the width to this arbitrary number seemed to work in gtk2/pygtk, but
      now the top level window is being resized to fit that width.
      Removing this line makes the text flow without provoking a resize in
      the window.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     extensions/cpsection/language/view.py           | 3 +--
     extensions/cpsection/modemconfiguration/view.py | 1 -
     2 files changed, 1 insertion(+), 3 deletions(-)
    
    diff --git a/extensions/cpsection/language/view.py b/extensions/cpsection/language/view.py
    index e88e383..95066f8 100644
    a b class Language(SectionView): 
    5858                                      ' If a translation is not available,'
    5959                                      ' the next in the list will be used.')
    6060        self._text = Gtk.Label(label=explanation)
    61         self._text.set_width_chars(100)
    6261        self._text.set_line_wrap(True)
    6362        self._text.set_alignment(0, 0)
    6463        self.pack_start(self._text, False, False, 0)
    class Language(SectionView): 
    135134
    136135        if self._selected_lang_count > 1:
    137136            previous_add_removes = self._add_remove_boxes[-2]
    138             previous_add_removes.hide_all()
     137            previous_add_removes.hide()
    139138
    140139        self._determine_add_remove_visibility()
    141140
  • extensions/cpsection/modemconfiguration/view.py

    diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
    index 7257679..d5aa399 100644
    a b class ModemConfiguration(SectionView): 
    6969                        ' to set up a mobile broadband connection to a'
    7070                        ' cellular (3G) network.')
    7171        self._text = Gtk.Label(label=explanation)
    72         self._text.set_width_chars(100)
    7372        self._text.set_line_wrap(True)
    7473        self._text.set_alignment(0, 0)
    7574        self.pack_start(self._text, False, False, 0)