[sugar] Merging sugar-toolkit changes from tomeu repository

Marco Pesenti Gritti mpgritti
Wed Mar 26 11:18:22 EDT 2008


On Wed, Mar 26, 2008 at 4:09 PM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
>  So, trying to summarize discussion in #sugar:
>
>  1 Accel group will be pushed from the top level window downwards.
>  s.g.Window would push it to the toolbox, which would push it into the
>  toolbars and then into the toolitems. (see details below)
>
>  2 We'll share the duplicated code similarly by simply sharing some
>  methods without inheritance.
>
>  3 Not really part of the API, I would prefer if this decision was
>  taken by the translation groups, but personally don't feel as
>  strongly.

I suggest we just punt on this for now (i.e. we don't make those
strings translatable in Sugar).

>  4 (Having our own AccelLabel) This is needed for showing diamonds
>  instead of "ctrl" or "alt". We'll drop it by now and later try to do
>  this with the upstream AccelLabel.
>
>  When setting up the UI, the window creates an accel_group and gives it
>  to the toolbox:
>  toolbox.set_data('accel_group', accel_group)

I think we don't need to use set_data here. We can make the
accell_group a toolbox property.

>  The toolbox will do the same to the toolbar and the toolbar to the toolitems.

We can either subclass toolbar or use set_data. I'd probably use set_data.

>  ToolItems and Toolbars will listen for parent-set, and then set the
>  accelerator to that accel_group.

Unless I'm missing something Toolbar will not need to listen for
parent_set. The items will then setup their accel on
self.parent.get_data('accell_group').

>
>  Marco, what about shortcuts for widgets not in the toolbar and CanvasItems?

Can you give concrete examples?

Marco



More information about the Sugar-devel mailing list