[Geany-devel] get build command from a plugin

Matthew Brush mbrush at xxxxx
Tue Jan 31 00:36:00 UTC 2012


On 01/30/2012 04:16 PM, Lex Trotman wrote:
> 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.
>

Sounds pretty good, I'll need to examine closer to be sure, but we can 
always make more changes after once we play with it for a bit.

Thanks,
Matthew Brush



More information about the Devel mailing list