Re: [anjuta-devel] Change project property interface
- From: Sébastien Granjoux <seb sfo free fr>
- To: Abderrahim Kitouni <a kitouni gmail com>
- Cc: anjuta-devel-list <anjuta-devel-list gnome org>
- Subject: Re: [anjuta-devel] Change project property interface
- Date: Mon, 19 Dec 2011 19:59:19 +0100
Hi Abderrahim,
Le 19/12/2011 16:22, Abderrahim Kitouni a écrit :
I've ported my buildj plugin to the new API, and I found a bug in
anjuta_project_property_info_new (and needed to add an annotation for
anjuta_project_node_insert_property_info), but it seems otherwise to
work fine.
Ok.
The only question remaining is the memory management of the properties
and properties_info lists: how is one supposed to free them?
In the autotools backend, the lists are owned by the plugin itself, so
the plugin should free them when it is deactivated.
I have added a flag ANJUTA_PROJECT_PROPERTY_STATIC to have temporary
properties owned by the node.
I think you can consider the each nodes owns its own properties info
list. My goal was to avoid enforcing one memory managment scheme. Is
there an issue to do this?
And for modifying a property, is removing the current one and inserting
another one a good idea? (I see that the am-backend is modifying the
property in place)
I have done it in place because it's easier. We can add a function to do
it if you need.
Some more thoughts:
* Making these lists gobject properties wasn't really a good idea.
We can remove these properties. Most of the time, I don't use gobject
properties. I think they are useful when you need constructors
parameters or when you need a very flexible interface as it allowed you
to configure your object from a string. If it's not needed for bindings,
I think it's better to remove them.
* The property field in AnjutaProjectPropertyInfo should probably be
renamed to default_value or something like this.
I would like to name it default, but it's one of the few C reserved
words. I don't like the current "property" name, so "default_value" is a
bit long but fine for me.
I can do the above myself once we agree on doing them.
Yes, no problem.
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]