On Wed, 2008-01-23 at 12:47 +0100, Jerome Blondel wrote:
> > On Mon, 2008-01-21 at 10:47 +0100, Jerome Blondel wrote:
> Even when the ref count of the submenu is increased, the program still 
> crashes on the second time the submenu is popped up. It seems the 
> destruction of the container has other side-effects.
[snip]
>             s->popup_stars = gtk_menu_new();
>             for (k = selected_stars; k != NULL; k = k->next)
>             {
[snip]
>                 stars = gtk_menu_item_new_with_label(str);
[snip]
>                 gtk_menu_shell_append(GTK_MENU_SHELL(s->popup_stars), 
> stars);
>             gtk_menu_item_set_submenu(GTK_MENU_ITEM(stars), 
> s->popup_actions);

You can not add the same menu as submenu for various menu items.

As long as you attach the menu to one item, it's detached from the
previous one.

You need here a function to create the same submenu for every menu item.

It have nothing to do with reference counting.


P.S.  Sorry for the private mail. It was meant to be sent to the list.
-- 
Iago Rubio

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to