[Sugar-devel] [PATCH shell 1/2] Fix layout of Language and Modem sections in the Control Panel - SL #3902

Simon Schampijer simon at schampijer.de
Tue Sep 25 09:35:50 EDT 2012


Excellent work!

Pushed and closed ticket.

http://git.sugarlabs.org/sugar/mainline/commit/374679c2fd7e6227a0440f85bed6d2232f42f684 


On 09/25/2012 02:26 AM, Manuel Quiñones wrote:
> - 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 at 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/extensions/cpsection/language/view.py
> +++ b/extensions/cpsection/language/view.py
> @@ -58,7 +58,6 @@ class Language(SectionView):
>                                         ' If a translation is not available,'
>                                         ' the next in the list will be used.')
>           self._text = Gtk.Label(label=explanation)
> -        self._text.set_width_chars(100)
>           self._text.set_line_wrap(True)
>           self._text.set_alignment(0, 0)
>           self.pack_start(self._text, False, False, 0)
> @@ -135,7 +134,7 @@ class Language(SectionView):
>
>           if self._selected_lang_count > 1:
>               previous_add_removes = self._add_remove_boxes[-2]
> -            previous_add_removes.hide_all()
> +            previous_add_removes.hide()
>
>           self._determine_add_remove_visibility()
>
> diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
> index 7257679..d5aa399 100644
> --- a/extensions/cpsection/modemconfiguration/view.py
> +++ b/extensions/cpsection/modemconfiguration/view.py
> @@ -69,7 +69,6 @@ class ModemConfiguration(SectionView):
>                           ' to set up a mobile broadband connection to a'
>                           ' cellular (3G) network.')
>           self._text = Gtk.Label(label=explanation)
> -        self._text.set_width_chars(100)
>           self._text.set_line_wrap(True)
>           self._text.set_alignment(0, 0)
>           self.pack_start(self._text, False, False, 0)
>



More information about the Sugar-devel mailing list