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 156156 - gnome_canvas_item_new() should use g_object_new_valist ()
gnome_canvas_item_new() should use g_object_new_valist ()
Status: RESOLVED FIXED
Product: libgnomecanvas
Classification: Deprecated
Component: core
unspecified
Other Linux
: High critical
: ---
Assigned To: libgnomecanvas maintainers
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2004-10-22 13:46 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2006-11-17 23:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-22 13:46:08 UTC
I derive from gnome_canvas_group and have gobject-properties that are
construct-only. Therefore it must not use g_object_set to set the properties
passes to gnome_canvas_item_new().
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2004-11-05 14:46:49 UTC
this is broken since at least version: 2.6.0.
I've just upgraded from suse9.1 to 9.2 and not this effektivly block me from
further development :-(.
Please at least confirm or reject it. If it is confirmed I post a patch
(allthough it seems to be simple to fix).
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2004-11-08 10:27:55 UTC
the problem lies in these lines (in gnome_canvas_item_new()):
item = GNOME_CANVAS_ITEM (g_object_new (type, NULL));
gnome_canvas_item_construct (item, parent, first_arg_name, args);

you set the properties in item_construct because the in the canvas design some
fundamental properties seems to rely on a canvas instance that is constructed
(wrong!).
item->parent = GNOME_CANVAS_ITEM (parent);
item->canvas = item->parent->canvas;

unfortunaly exchanging g_object_new() with g_object_new_valist() is not enough
to fix it, but it shows the broken behavious of existing properties.


Comment 3 Sven Herzberg 2006-11-12 22:22:48 UTC
Confirming. Stefan, if you can provide a bug, I'm going to test it and check it in.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2006-11-13 10:03:50 UTC
this requires more extensive architectural changes, which are not worth the amount of work right now, given the popularity of the gnome-canvas and due to the fact that other canvas' will take over.
Comment 5 Sven Herzberg 2006-11-17 23:10:16 UTC
Reopening to make sure that this gets documented properly.
Comment 6 Sven Herzberg 2006-11-17 23:11:56 UTC
2006-11-18  Sven Herzberg  <herzi@gnome-de.org>

        * libgnomecanvas/gnome-canvas.c: added documentation about how to pass
        construct parameters to GnomeCanvasItem implementations. Closes bug
        #156165 (Pointed out by Stefan Kost)