Re: menu doesn't have ancestor?
- From: Havoc Pennington <hp redhat com>
- To: pzn terra com br
- Cc: gtk-list gnome org
- Subject: Re: menu doesn't have ancestor?
- Date: 27 Jul 2001 15:36:58 -0400
Pedro Zorzenon Neto <pzn terra com br> writes:
>
> When I do:
>
> anc = gtk_widget_get_ancestor (button1, GTK_TYPE_WINDOW);
>
> inside a button1 callback, it returns a pointer to the ancestor window.
>
> But if I do it inside a menu item callback (changing button1 to menuitem1)
> it doesn't work.
>
> Any hints?
GtkMenu is a toplevel, so the menu items are not inside a GtkWindow.
Easiest thing is to set the GtkWindow on the menu items with
gtk_object_set_data().
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]