[Sugar-devel] [PATCH] Start filtered activity with keyboard

Sascha Silbe sascha-ml-reply-to-2011-4 at silbe.org
Mon Nov 28 10:10:35 EST 2011


Excerpts from godiard's message of 2011-11-07 13:06:45 +0100:
> From: Gonzalo Odiard <godiard at gmail.com>
> 
> This patch complement the filter functionality in the home view.
> If only one activity is selected, Return key start the activity.

Nice one. Both Return (default action, i.e. resume latest) and 
Alt-Return (alternate action, i.e. Start New) work as expected.

The functionality is good enough for a first iteration IMO. We can land
further enhancements (like choosing from multiple matches) later,
preferably after we got rid of hippo-canvas.


[src/jarabe/desktop/favoritesview.py]
> +    def start_selected_activity(self):
> +        if len(self._filtered_icons) == 1:
> +            self._filtered_icons[0]._activate()

This uses private API of ActivityIcon, which pylint rightfully complains
about. Just making ActivityIcon._activate() public isn't quite the
right answer, as _activate() interacts with the associated Palette. The
latter code should move to __palette_activate_cb() first.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20111128/5094153f/attachment.pgp>


More information about the Sugar-devel mailing list