Incorrect refcount for gtk_menu_item



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!

Any idea ?

regards,
Emmanuel
GtkAda team



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]