Re: [Geany-Devel] How can a plugin invoke menu items/geany actions?

2017-12-20 Thread Lars Paulsen

@Lex, @Matthew: thanks for the quick response.


On 20.12.2017 23:46, Matthew Brush wrote:

On 2017-12-20 01:37 PM, Lars Paulsen wrote:

Hi All,

I would like to start actions in geany from inside a geany plugin?

E.g. start the Color Chooser as if it was selected from the geany 
tools menu.
I tried to call the callback function directly but that gives an 
linker error for geany plugins (just logical).


Can I fire/send an event/message to make it being started? How do I 
do that?




If you happen to find one that's not available as a keybinding 
command, you can also use `ui_lookup_widget()` to get a handle on the 
menu item and then activate it through code (ie. 
`gtk_actionable_activate()` or something). This is kind of brittle, 
but it does work.


Regards,
Matthew Brush

___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] How can a plugin invoke menu items/geany actions?

2017-12-20 Thread Matthew Brush

On 2017-12-20 01:37 PM, Lars Paulsen wrote:

Hi All,

I would like to start actions in geany from inside a geany plugin?

E.g. start the Color Chooser as if it was selected from the geany tools 
menu.
I tried to call the callback function directly but that gives an linker 
error for geany plugins (just logical).


Can I fire/send an event/message to make it being started? How do I do 
that?




If you happen to find one that's not available as a keybinding command, 
you can also use `ui_lookup_widget()` to get a handle on the menu item 
and then activate it through code (ie. `gtk_actionable_activate()` or 
something). This is kind of brittle, but it does work.


Regards,
Matthew Brush

___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] How can a plugin invoke menu items/geany actions?

2017-12-20 Thread Lex Trotman
On 21 December 2017 at 07:37, Lars Paulsen  wrote:
> Hi All,
>
> I would like to start actions in geany from inside a geany plugin?
>
> E.g. start the Color Chooser as if it was selected from the geany tools
> menu.
> I tried to call the callback function directly but that gives an linker
> error for geany plugins (just logical).
>
> Can I fire/send an event/message to make it being started? How do I do that?

https://www.geany.org/manual/reference/keybindings_8h.html#a9b9034dde2091a8d2653d99fcb270a93

>
> Best Regards,
> Lars
>
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


[Geany-Devel] How can a plugin invoke menu items/geany actions?

2017-12-20 Thread Lars Paulsen

Hi All,

I would like to start actions in geany from inside a geany plugin?

E.g. start the Color Chooser as if it was selected from the geany tools 
menu.
I tried to call the callback function directly but that gives an linker 
error for geany plugins (just logical).


Can I fire/send an event/message to make it being started? How do I do that?

Best Regards,
Lars

___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel