Re: [anjuta-devel] Change project property interface
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Sébastien Granjoux <seb sfo free fr>
- Cc: anjuta-devel-list <anjuta-devel-list gnome org>
- Subject: Re: [anjuta-devel] Change project property interface
- Date: Wed, 09 Nov 2011 23:09:39 +0100
Hello Sébastien,
في ث، 08-11-2011 عند 21:35 +0100 ، كتب Sébastien Granjoux:
I will do the following changes:
* Change the following functions of IAnjutaProject interface (I think
nobody use them so I think it's not an issue to break the compatibility)
AnjutaProjectProperty *ianjuta_project_set_property (AnjutaProjectNode
*parent, const gchar *id, const gchar *value); (transfer none)
I think this is really nice, but this wouldn't allow one to set a map
property, would it? Do we need to add a set_map_property? (I also like
the symmetry with anjuta_project_node_get_property and
anjuta_project_node_get_map_property. The same goes for
anjuta_project_property_new below.
gboolean ianjuta_project_remove_property (AnjutaProjectNode *parent,
const gchar *id);
Ok.
* Change the following types:
struct _AnjutaProjectProperty
[...]
struct _AnjutaProjectPropertyInfo
[...]
Ok.
struct _AnjutaProjectNode
[..]
Ok.
* Have the following function in anjuta-project.h
[...]
Is it ok to do at least all this?
Yes, this looks fine to me.
Then a few other questions and remarks.
* The anjuta_project_node_insert_property_info is perhaps not very
useful because at least in the autotools backend. The properties infos
list constant and shared but all node of the same type. So it will be
rather
void anjuta_project_node_insert_property_info (
AnjutaProjectNode *node,
GList *info);
* I'd prefer to have the list owned by the node, so I don't really like
this.
* Regarding having something shared between all the objects of the same
type, they could be put in the AnjutaProjectNodeClass struct. This is
used in gtk, so I think it should work well with introspection. We
should probably test it first. The method would then be
void anjuta_project_node_class_insert_property_info (
AnjutaProjectNodeClass *klass,
AnjutaProjectPropertyInfo *info);
Anyway, one backend could use a custom list for each node.
I don't know, maybe we should allow this.
* Do I need to add set and get function for all attributes of property
and property info object?
I think a property info could be considered constant and thus doesn't
need setters. Property could use setters. Getters are not strictly
necessary but may be a good idea for symmetry.
* Some function of the anjuta-project.h are "public" and can be used by
any plugin by example anjuta_project_node_get_property. While other are
"private" and are usable by a backend plugin only by example
anjuta_project_node_insert_property (other plugins have to use
ianjuta_project_set_property instead).
I think I need at least to separate them in the header file. But do you
think we need to move them to a separate header or do you have a better
idea to make this different more clear? By the way, I don't know if it's
clear for you.
I think it is enough to add a note in the documentation comments stating
that this function should only be used by backend implementation.
Regards,
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]