RE: Incorrect refcount for gtk_menu_item
- From: Murray Cumming Comneon com
- To: briot act-europe fr, gtk-devel-list gnome org
- Subject: RE: Incorrect refcount for gtk_menu_item
- Date: Wed, 11 Jun 2003 15:18:22 +0200
> From: Emmanuel Briot [mailto:briot act-europe fr]
>
> I have the following problem with a gtk_menu_item that contains a
> gtk_accel_label. I this is considered as a bug, I'll report this in
> bugzilla.
> Sorry I don't have code example, but this is a problem I found in the
> context of a big Ada application and with the GtkAda binding.
>
> When a menu_item is created through gtk_menu_item_new_with_label, its
> total initial refcount is 2 (1 for the widget itself, +1 because the
> accel_label has called gtk_accel_label_set_accel_widget,
> resulting in an
> extra reference on the menu_item.
>
> If the menu_item is then added to a menu, and finally removed from it,
> the widget is not destroyed.
> This has the effect also that the key shortcut is still
> active, although
> the item is no longer visible!
Yes, we had a similar problem with gtkmm, when removing the menu item:
http://bugzilla.gnome.org/show_bug.cgi?id=111084
So we explicitly unset the accel_widget.
I don't think it's a problem if the menu is destroyed with the menu item in
it. I think it's just a problem if you remove the menu item.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]