[Geany-devel] get build command from a plugin

Lex Trotman elextr at xxxxx
Tue Jan 31 00:16:16 UTC 2012


On Tue, Jan 31, 2012 at 10:16 AM, Matthew Brush <mbrush at codebrainz.ca> wrote:
> On 01/28/2012 06:08 AM, Dimitar Zhekov wrote:
>>
>> Hi,
>>
>> How can I $subject?
>>
>
> FWIW, I also have a need for this for an Android plugin I'm working on
> (using Eclipse is sooo painful).
>
> So far I've found a need to both get and set the build commands for a
> project (and the working dir) and also to programmatically cause them to run
> (IIRC this is already working by a keybindings hack). My current code is
> basically just duplicating all the project and build stuff under it's own
> menu since it's not exposed, but it feels clunky and redundant.

DRY

So in addition to the proposal to Dimitar, add function:

build_set_menu_item( const GeanyBuildSource src, const GeanyBuildGroup
grp, const unsigned cmd, const GeanyBuildCmdEntries field, const gchar
*value )

Unfortunately that will update the menu for each field you write, but
I can't trust you to call build_menu_update() when you have finished,
can I?

Also add function:

build_activate_menu_item( const GeanyBuildSource src, const
GeanyBuildGroup grp, const unsigned cmd )

which can activate *all* the menu items, the keybinding hack can't
bind other than the "well known" commands that were in Geany
originally, so you can't activate them ATM.

Cheers
Lex

>
> Cheers,
> Matthew Brush
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel



More information about the Devel mailing list