[Sugar-devel] [PATCH sugar-toolkit-gtk3] Key grabber: make grab_keys introspectable

Simon Schampijer simon at schampijer.de
Wed Aug 22 12:36:03 EDT 2012


On 08/22/2012 01:58 PM, Manuel Quiñones wrote:
> Great Simon,I tested it in the shell port branch and the keystrokes
> for changing the zoom level and showing/hiding the frame are back.
>
> 2012/8/22 Simon Schampijer <simon at schampijer.de>:
>> To the grab_keys function we pass a list of strings the key
>> grabber should listen for. In order to make this
>> introspectable we need to annotate the function correctly. I
>> followed the instructions for passing arrays [1] and have
>> chosen the type of the array data looking at [2].
>>
>> A simple example on how to test this is at [3]. The 'a'
>> keystroke is grabbed by the key grabber.
>>
>> Signed-off-by: Simon Schampijer <simon at laptop.org>
>
> Tested-by: Manuel Quiñones <manuq at laptop.org>
>
>> [1] https://live.gnome.org/PyGObject/IntrospectionPorting#Passing_arrays
>> [2] https://live.gnome.org/GObjectIntrospection/Annotations#Default_Basic_Types
>> [3] http://dev.laptop.org/~erikos/touch/test_keyhandler.py

Thanks Manuel. Daniel did review it as well. Pushed to the porting repo 
and the main one.

Simon



More information about the Sugar-devel mailing list