[Geany] getting project base_path from plugin

Yura Siamashka yurand2 at xxxxx
Tue Dec 25 09:36:01 UTC 2007


Hi

On Mon, Dec 24, 2007 at 11:15:36PM +0100, Bo Lorentsen wrote:
> Hi ...
>
> While getting my cmake plugin working I got this strange error while 
> compiling.
>
> The idea in the code is to get the project base dir, by accessing the "app" 
> instance and then the "project" pointer. But the compiler provide me with 
> some strange output.
>
> The code is :
>
> 255 : /* open the current make file */
> 256 : if( app->project != NULL )
> 257 :	base_path = app->project->base_path;
>
> This is the error :
>
> cmakeprj.c:256: error: 'GeanyApp' has no member named 'geany_data'
That is simple. In pluginmacros.h

#define app			geany_data->app
#define doc_array		geany_data->doc_array
#define prefs			geany_data->prefs
#define project			app->project

so app->project transform to:

geany_data->app->geany_data->app->project

use "project" instead of "app->project"

> Also, how do I get noted if the project is changed or saved ?
see plugindata.h callbacks "project-open", "project-save", "project-close".

Best regards,
Yura Siamashka




More information about the Users mailing list