Re: keybindings

From: Martin Sevior <msevior_at_gmail.com>
Date: Mon Dec 22 2008 - 01:23:06 CET

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 Mon Dec 22 01:30:31 2008

This archive was generated by hypermail 2.1.8 : Mon Dec 22 2008 - 01:30:31 CET