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): |
58 | 58 | ' If a translation is not available,' |
59 | 59 | ' the next in the list will be used.') |
60 | 60 | self._text = Gtk.Label(label=explanation) |
61 | | self._text.set_width_chars(100) |
62 | 61 | self._text.set_line_wrap(True) |
63 | 62 | self._text.set_alignment(0, 0) |
64 | 63 | self.pack_start(self._text, False, False, 0) |
… |
… |
class Language(SectionView): |
135 | 134 | |
136 | 135 | if self._selected_lang_count > 1: |
137 | 136 | previous_add_removes = self._add_remove_boxes[-2] |
138 | | previous_add_removes.hide_all() |
| 137 | previous_add_removes.hide() |
139 | 138 | |
140 | 139 | self._determine_add_remove_visibility() |
141 | 140 | |
diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
index 7257679..d5aa399 100644
a
|
b
|
class ModemConfiguration(SectionView): |
69 | 69 | ' to set up a mobile broadband connection to a' |
70 | 70 | ' cellular (3G) network.') |
71 | 71 | self._text = Gtk.Label(label=explanation) |
72 | | self._text.set_width_chars(100) |
73 | 72 | self._text.set_line_wrap(True) |
74 | 73 | self._text.set_alignment(0, 0) |
75 | 74 | self.pack_start(self._text, False, False, 0) |