Re: [anjuta-devel] Change project property interface



Hello Sébastien,

              في ح، 06-11-2011 عند 11:37 +0100 ، كتب Sébastien Granjoux:
Yes, we have different ideas but we are getting closer and closer. I 
really appreciate such discussion. You find it perhaps a bit slow but I 
need some time to find better arguments or change my mind.

Don't worry, I'm not really annoyed. I'm also glad we're finding a
solution.


If we compare
AnjutaProjectProperty* ianjuta_project_set_property (IAnjutaProject 
*obj, AnjutaProjectNode *parent, const gchar *name,  const gchar *value, 
GError **err);
to
AnjuaProjectProperty* anjuta_project_node_set_property 
(AnjutaProjectNode *parent, const gchar *name,  const gchar *value, 
GError **err);

The difference is not that big. It's easy to implement the first 
function using the second one (the opposite is possible but more 
difficult). In the autotools project, it's easier to use the first 
function because I'm using a common commands queue.

I think there is a misunderstanding here: I've never wanted to remove
ianjuta_project_set_property nor to make
anjuta_project_node_set_property a public API. I just wanted to make
clear the difference between the two. But I'm now convinced that freeing
the backend specific data in ianjuta_project_set_property is not really
a bad idea.

So taking your comments into account, here is another proposal:
* Add a void *user_data to both AnjutaProjectProperty and
AnjutaProjectProperty (this could be called something else).

Ok, I will call it data like in GList.

I'd rather take a name that makes it clear that it's backend-specific
data.

So here is another proposal that should be better for you too.

[...]
struct _AnjutaProjectPropertyInfo
{
     const gchar *id;
     AnjutaProjectValueType type;
     AnjutaProjectPropertyFlags flags;
     const gchar *description;
     AnjutaProjectProperty *default;
}

I was thinking about something similar. So I think we've come to an
agreement.

Regards,
Abderrahim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]