[Sugar-devel] [PATCH shell] ControlPanel: fix packaging in the keyboard section

Manuel Quiñones manuq at laptop.org
Wed Sep 19 08:11:14 EDT 2012


Thanks Simon, great this patches finish the pack_start API change, and
consider the comboboxes pack_start which is different.  Great.  So we
have #3925 to follow up that issue.  You can push all three patches.

2012/9/19 Simon Schampijer <simon at schampijer.de>:
> From: Simon Schampijer <simon at laptop.org>
>
> - pack_start: we have to pass all arguments now with the dynamic bindings
> - Gtk.ComboBox pack_start only allows for 2 arguments [1]
>
> A follow up is to make displaying the section not crash Sugar anymore
> SL #3926.
>
> [1] http://python-gtk-3-tutorial.readthedocs.org/en/latest/combobox.html
>
> Signed-off-by: Simon Schampijer <simon at laptop.org>
> ---
>  extensions/cpsection/keyboard/view.py | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/extensions/cpsection/keyboard/view.py b/extensions/cpsection/keyboard/view.py
> index 587c530..085ec10 100644
> --- a/extensions/cpsection/keyboard/view.py
> +++ b/extensions/cpsection/keyboard/view.py
> @@ -77,9 +77,9 @@ class LayoutCombo(Gtk.HBox):
>          cell = Gtk.CellRendererText()
>          cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>          cell.props.ellipsize_set = True
> -        self._klang_combo.pack_start(cell, True, True, 0)
> +        self._klang_combo.pack_start(cell, True)
>          self._klang_combo.add_attribute(cell, 'text', 1)
> -        self.pack_start(self._klang_combo, expand=True, fill=True)
> +        self.pack_start(self._klang_combo, expand=True, fill=True, padding=0)
>
>          self._kvariant_store = None
>          self._kvariant_combo = Gtk.ComboBox(model=None)
> @@ -89,9 +89,9 @@ class LayoutCombo(Gtk.HBox):
>          cell = Gtk.CellRendererText()
>          cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>          cell.props.ellipsize_set = True
> -        self._kvariant_combo.pack_start(cell, True, True, 0)
> +        self._kvariant_combo.pack_start(cell, True)
>          self._kvariant_combo.add_attribute(cell, 'text', 1)
> -        self.pack_start(self._kvariant_combo, expand=True, fill=True)
> +        self.pack_start(self._kvariant_combo, expand=True, fill=True, padding=0)
>
>          self._klang_combo.set_active(self._index)
>
> @@ -205,7 +205,7 @@ class Keyboard(SectionView):
>          cell = Gtk.CellRendererText()
>          cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>          cell.props.ellipsize_set = True
> -        kmodel_combo.pack_start(cell, True, True, 0)
> +        kmodel_combo.pack_start(cell, True)
>          kmodel_combo.add_attribute(cell, 'text', 1)
>
>          self._kmodel = self._keyboard_manager.get_current_model()
> @@ -265,7 +265,7 @@ class Keyboard(SectionView):
>          cell = Gtk.CellRendererText()
>          cell.props.ellipsize = Pango.EllipsizeMode.MIDDLE
>          cell.props.ellipsize_set = True
> -        group_option_combo.pack_start(cell, True, True, 0)
> +        group_option_combo.pack_start(cell, True)
>          group_option_combo.add_attribute(cell, 'text', 1)
>
>          self._group_switch_option = \
> --
> 1.7.11.4
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..


More information about the Sugar-devel mailing list