Use menu->toplevel rather than getting the parent.

This commit is contained in:
Marco Pesenti Gritti 2007-07-31 11:30:14 +02:00
parent dbe8a6eeff
commit d7f7271cfe

View File

@ -34,7 +34,7 @@ sugar_menu_popup(SugarMenu *menu,
{
GtkWidget *window;
window = GTK_WIDGET(menu)->parent;
window = GTK_MENU(menu)->toplevel;
g_return_if_fail(window != NULL);
GTK_MENU_SHELL(menu)->active = TRUE;
@ -50,7 +50,7 @@ sugar_menu_popdown(SugarMenu *menu)
{
GtkWidget *window;
window = GTK_WIDGET(menu)->parent;
window = GTK_MENU(menu)->toplevel;
g_return_if_fail(window != NULL);
GTK_MENU_SHELL(menu)->active = FALSE;