[sugar] Merging sugar-toolkit changes from tomeu repository

Tomeu Vizoso tomeu
Fri Mar 28 09:46:00 EDT 2008


On Wed, Mar 26, 2008 at 4:18 PM, Marco Pesenti Gritti
<mpgritti at gmail.com> wrote:
> 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).

Ok.

>  >  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.

Eben said the toolbars won't have accelerators for now.

>  >  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.

See above.

>  >  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').

See above.

>  >  Marco, what about shortcuts for widgets not in the toolbar and CanvasItems?
>
>  Can you give concrete examples?

Eben said only ToolButtons in toolbars should have accelerators. So forget that.

Please review the attached patch.

Thanks,

Tomeu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-accelerators-to-buttons.patch
Type: text/x-patch
Size: 14492 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080328/4855d655/attachment.bin 



More information about the Sugar-devel mailing list