Re: call python code from UI

Looks interesting.

The first change to py-func/ introduces whitespace at the
start and end of the description.  That doesn't look right.

Why the changes to python-loader/python-loader.c?


On Thu, Oct 17, 2013 at 12:14 PM, Anatoly Asviyan <aanatoly gmail com> wrote:
I've spent some time with gdb and fixed the problem. Now UI can call python
Hope  the patch is ok and could be commited. What do you think?

1. fix to 'ui' service,to start/stop in the same way as working 'function
group' service
2. UI example in py-func demo plugin. It adds 'Tools/Say hello' menu item
that prints 'hello' in A1 cell

The patch against gnumeric-1.12.7 is here

2013/10/11 Anatoly Asviyan <aanatoly gmail com>

I'm writing demo python plugin that adds  menu item to insert 'hello' into
A1  cell
The function to change a spreadsheat is ok (see below) but I can't make UI
to actually call it
and need help with that

Gnumeric version: 1.12.0
Plugin code:
1. gnumeric's plugin manager shows new 'abc' plugin with 1 user interface
2. there is new 'Say hello' menu item under 'Tools' menu
3. running the action from python console works
4. running same action from menu does not (seems that it just isn't

To run it from console
1. click on a 'say hello' menu item, that adds new interpreter
2. open python console, select 'abc' interpreter
3. run f_abc_action1(0,0) and see 'hello' in A1 cell

Regards, Anatoly

Regards, Anatoly

gnumeric-list mailing list
gnumeric-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]