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 348809 - Gtk::manage() doesn't work with canvas items.
Gtk::manage() doesn't work with canvas items.
Status: RESOLVED WONTFIX
Product: libgnomecanvasmm
Classification: Deprecated
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: libgnomecanvasmm-maint
libgnomecanvasmm-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2006-07-26 16:36 UTC by Jean-Marc Valin
Modified: 2014-08-02 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (1.10 KB, text/x-c++src)
2006-07-26 16:40 UTC, Jean-Marc Valin
  Details
canvas_example_with_manage.patch (1.96 KB, patch)
2006-07-26 16:47 UTC, Murray Cumming
none Details | Review

Description Jean-Marc Valin 2006-07-26 16:36:39 UTC
Please describe the problem:
I have noticed that canvas items I create are not destroyed automatically when the parent group is destroyed. This is contrary to (my understanding of) the C version of the canvas. Also, the C examples for the canvas show items not being explicitly  destroyed, while the libgnomecanvasmm examples have explicit destruction of the items. Assuming the examples are correct, then the C++ bindings fundamentally change the way item destruction is done. There is no mention of that anywhere in the (little) documentation provided.

Steps to reproduce:
Create an item, delete the parent group.

Actual results:
Nothing, item is not destroyed.

Expected results:
Item should be destroyed when the parent group is destroyed (specified in the C version of the canvas).

Does this happen every time?
yes

Other information:
Comment 1 Jean-Marc Valin 2006-07-26 16:40:01 UTC
Created attachment 69676 [details]
testcase

When running this program and closing the window, the canvas' destructor gets called, but not the item's destructor.
Comment 2 Murray Cumming 2006-07-26 16:45:53 UTC
It would indeed be nice if Gtk::manage() worked with Canvas items. That's the bug here, I think.

I don't know whether libgnomecanvasmm intentionally prevents automatic item destruction, as we do with gtkmm child widgets, but it makes sense for us to want it here too. But maybe it's due to code in GtkObject (Gnome::Canvas::Item derives from Gtk::Object). 
Comment 3 Murray Cumming 2006-07-26 16:47:00 UTC
Created attachment 69677 [details] [review]
canvas_example_with_manage.patch

This is another test case. The patch changes the existing example to use manage() and demonstrates that the destructor is not called.
Comment 4 Jean-Marc Valin 2006-08-02 15:35:15 UTC
As I mentioned on the gtkmm mailing list, we've dropped the idea of using libgnomecanvasmm, so there's probaby nobody waiting for a resolution of this issue anymore. Feel free to close as WONTFIX if that's the case.
Comment 5 Jean-Marc Valin 2007-11-28 13:12:52 UTC
Just realised that was still open. I think it's safe to mark that as WONTFIX now. Good thing I wasn't holding my breath ;-)
Comment 6 Murray Cumming 2009-01-27 09:31:25 UTC
Personally I am putting time into goocanvas(mm) rather than libgnomecanvas. goocanvas uses reference-counting instead.
Comment 7 André Klapper 2014-08-02 12:48:32 UTC
The last libgnomecanvasmm code changes took place in 2008:
https://git.gnome.org/browse/archive/libgnomecanvasmm/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.