After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 72426 - AtkRelation can not be instantiated with only g_object_new()
AtkRelation can not be instantiated with only g_object_new()
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
0.9
Other Linux
: Normal normal
: ---
Assigned To: padraig.obriain
padraig.obriain
Depends on:
Blocks: 86865
 
 
Reported: 2002-02-24 14:10 UTC by Murray Cumming
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to fix problem (4.67 KB, patch)
2002-02-25 15:31 UTC, padraig.obriain
none Details | Review
Updated patch (6.47 KB, patch)
2003-01-14 14:53 UTC, padraig.obriain
none Details | Review

Description Murray Cumming 2002-02-24 14:10:17 UTC
*_new() methods should be only convenience functions which call
g_object_new() with appropriate properties. This is necessary for language
bindings.
Comment 1 padraig.obriain 2002-02-25 08:37:49 UTC
If I understand you correctly, AtkRelation needs to define two
properties, "relation_type" and "targets" so that an AtkRelation can
be created using a call to g_object_new(). Is this correct?

Are you asking that the signature of the function atk_relation_new()
be changed?
Comment 2 Murray Cumming 2002-02-25 09:25:55 UTC
Yes, it's normal to have properties which can be supplied to
g_object_new(). Another alternative that's acceptable for some
language bindings but not for all, and not for glade-like RAD systems
is to add a _construct() function that's called by the _new() function.

No, I'm not asking for the signature of atk_relation_new() to be
changed. We (gtkmm) don't use atk_relation_new().
Comment 3 padraig.obriain 2002-02-25 15:31:57 UTC
Created attachment 6860 [details] [review]
Proposed patch to fix problem
Comment 4 padraig.obriain 2002-02-25 15:32:35 UTC
I have attached a patch to fix the problem. Is this the type of change
you had in mind?
Comment 5 Murray Cumming 2002-02-25 16:41:03 UTC
Yes, though I think people will frown upon the use of a bare void*
property. I think that there may be more structured alternative
property types, but I'm not sure.

Adding properties _is_ an API change, by the way.
Comment 6 Murray Cumming 2002-04-19 09:48:02 UTC
This is still better than nothing, and should be applied.
Comment 7 bill.haneman 2002-04-19 10:45:08 UTC
I think a patch like this (preferably with a structured type for the
"targets" list, as Murray suggests) should be applied.  It will
require RT review I believe, and it's not clear whether it should go
to HEAD or an ATK 1.X branch.
Comment 8 padraig.obriain 2002-04-19 11:55:57 UTC
I do not see an existeing type I can use; perhaps I need to define a
new type.
Comment 9 padraig.obriain 2003-01-14 14:53:13 UTC
Created attachment 13558 [details] [review]
Updated patch
Comment 10 padraig.obriain 2003-01-14 14:59:34 UTC
I have attached an alternative patch which uses GValueArray as
property value for the array of objects in the relationship.

I propose to commit this once we branch after GNOME 2.2.
Comment 11 padraig.obriain 2003-01-21 11:55:46 UTC
Patch has been applied to CVS HEAD after branch for gnome-2-2.