Re: keybindings

From: Daniel Carvalho <idnael_at_gmail.com>
Date: Tue Dec 23 2008 - 13:27:01 CET

thanks again!

I will take a look in the olpc code also :-)

2008/12/22 Tomeu Vizoso <tomeu@sugarlabs.org>:
> To complete Martin's words, here is the code used in Sugar/OLPC:
>
> http://dev.laptop.org/git?p=projects/write;a=tree
>
> Though the repo may be moved soon to htttp://git.sugarlabs.org
>
> Regards,
>
> Tomeu
>
> On Mon, Dec 22, 2008 at 01:23, Martin Sevior <msevior@gmail.com> wrote:
>>
>> Hi Daniel,
>> Did you build the loadbindings plugin? The API has
>> changed considerably since that code was written. I should update it
>> to reflect the new changes.
>>
>> Have a look at abiword/plugins/loadbindings/xp/LoadBindings.cpp
>>
>> The new relevant command string would be:
>>
>> self._abiword_canvas.invoke_cmd("com.abisource.abiword.loadbindings.fromURI",szFile,0,0)
>>
>> Where szFile is the zero terminated string containing the path to the
>> XML keybinding file. I should update Advanced.py to reflect this.
>>
>> We use this code extensively in OLPC Write so it all works. There are
>> various other useful commands to load keybindings from in-memory and
>> to dump the current bindings to a file in the required XML format. The
>> advantage of doing the latter is that you can edit it yourself and
>> deduce the file format.
>>
>> Cheers
>>
>> Martin
>> On Mon, Dec 22, 2008 at 10:17 AM, Daniel Carvalho <idnael@gmail.com> wrote:
>>>
>>> Hello
>>> I'm using pyabiwidget and want to disable some keybindings, like the
>>> control S = save file.
>>>
>>> I saw a message about this in:
>>> http://www.abisource.com/mailinglists/abiword-dev/2007/Apr/0016.html
>>> but it seems that api is not implemented in python
>>>
>>> The "advanced" example included with pyabiword-0.6.1 has something
>>> about key bindings but that code has no effect... (I have the
>>> "abicommand" and "loadbindings" plugins)
>>> self._abiword_canvas.invoke_cmd("LoadBindings_invoke",defKeys,0,0)
>>> self._abiword_canvas.invoke_cmd("SetBindings_invoke","AbiDefault",0,0)
>>>
>>> Should this work? Or isthere other way in python?
>>>
>>>
>>>
>>> Btw, where can I find information abound the commands that can be
>>> called with invoke_cmd?
>>>
>>>
>>> daniel
>>>
>>
>
Received on Tue Dec 23 13:27:10 2008

This archive was generated by hypermail 2.1.8 : Tue Dec 23 2008 - 13:27:11 CET