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 166707 - GnomeCanvasItem: Enable GObject contruction properties
GnomeCanvasItem: Enable GObject contruction properties
Status: RESOLVED WONTFIX
Product: libgnomecanvas
Classification: Deprecated
Component: core
2.9.x
Other Linux
: Normal normal
: ---
Assigned To: libgnomecanvas maintainers
libgnomecanvas maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2005-02-08 19:42 UTC by Roger Leigh
Modified: 2014-08-02 12:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Mend GnomeCanvasItem construction so g_object_new works (8.88 KB, patch)
2005-02-08 19:44 UTC, Roger Leigh
none Details | Review
As before, but construct correctly when no paramters are given (8.97 KB, patch)
2005-02-08 21:53 UTC, Roger Leigh
none Details | Review

Description Roger Leigh 2005-02-08 19:42:27 UTC
Version details: And 2.8.x
Distribution/Version: Debian sid

GnomeCanvasItem does not allow for the use of GObject construction properties
with gnome_canvas_item_new() due to the two-phase mechanism of object
construction.  The object properties are set in the second phase, after the
initial construction.  All properties must therefore be writable post-construction.

The attached patch reworks things to use a GObject constructor to replace
item_post_create_setup() and removes the need for gnome_canvas_item_construct()
by making the parent item and canvas into construction properties.

For backwards-compatibility and convenience, gnome_canvas_item_new() sets the
"canvas" and "parent" properties automatically, and puts them and the
user-supplied properties into a GParameter list to pass to g_object_newv() (the
va_list handling is taken from g_object_new_valist()).  However, it's now
possible to fully-construct canvas items using g_object_new alone, so it's far
less crufty than before.

For ABI compatibility, it might be necessary to retain
gnome_canvas_item_construct(), but stub it out so it simply wraps
g_object_set_valist (ignoring the parent argument, since this is construct-only).


If you apply this, it should subsequently be possible to make the derived
GnomeCanvasItem properties into construction parameters, and (if required) make
them construct only.


Regards,
Roger
Comment 1 Roger Leigh 2005-02-08 19:44:51 UTC
Created attachment 37196 [details] [review]
Mend GnomeCanvasItem construction so g_object_new works

Applies to the CVS mainline or 2.8.0.

Regards,
Roger
Comment 2 Roger Leigh 2005-02-08 19:45:35 UTC
This should also make it easier to language bindings which can't use
gnome_canvas_item_new directly.
Comment 3 Roger Leigh 2005-02-08 21:53:47 UTC
Created attachment 37209 [details] [review]
As before, but construct correctly when no paramters are given

When gnome_canvas_item_new is given no extra parameters, set the parent and
canvas properties correctly.
Comment 4 Roger Leigh 2005-03-18 15:32:32 UTC
Is there a problem with this patch, or can it be applied?  Is there anything
else  I can do?

Regards,
Roger
Comment 5 Kjartan Maraas 2005-05-11 11:58:21 UTC
There's the problem that gnome-canvas has been mostly unmaintained for years.
I'll see if I can find someone to look at the patches.
Comment 6 Roger Leigh 2005-05-11 12:48:33 UTC
Thanks.  I'll be happy to redo the patches if they need extra work.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2008-09-01 18:35:21 UTC
It is a valid issue. Also the patch looks good as such.
Comment 8 André Klapper 2014-08-02 12:52:47 UTC
The last libgnomecanvas code changes took place in January 2011:
https://git.gnome.org/browse/archive/libgnomecanvas/log/

This project is not under active development anymore.

This project got recently archived in GNOME Git.

It is currently unlikely that there will be any further active development.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development again. If you are interested in maintainership, inform https://mail.gnome.org/mailman/listinfo/desktop-devel-list