Destroying popup menus (possible bug)



Hi,

This may be a bug.

I'm using context-sensitive popup menus, which are created on the fly
and are to be deleted as soon as they pop down.

To delete the menu I added a 'deactivate' signal to it:

  gtk_signal_connect_object (GTK_OBJECT (menu), "deactivate",
        GTK_SIGNAL_FUNC(gtk_widget_destroy),
        GTK_OBJECT(menu));

However, if any menu items are selected, the menu disappears but the
menuitem 'activate' signal handlers are not called. I assume the
problem is that the menu is destroyed before the handler is called.

Should it be changed so that menuitem 'activate' handlers are called
before the menu 'deactivate' handler?

Or should I be using another way to destroy the menu after it disappears?


Damon





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