[maemo-developers] [maemo-developers] Way to get a reference to parent HildonAppView from its menu
From: Kalle Vahlman kalle.vahlman at gmail.comDate: Thu Jan 19 08:53:33 EET 2006
- Previous message: [maemo-developers] Installed perl / PDL on the Nokia 770
- Next message: [maemo-developers] Way to get a reference to parent HildonAppView from its menu
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 1/18/06, Fred Lefévère-Laaoide <Fred at lefevere-laoide.net> wrote: > Have you try gtk_widget_get_toplevel ? That would give the HildonApp, as AppViews are not toplevels. You could then of course iterate over the list of appviews and check which has the menu... > Luca Donaggio wrote: > > How can I get a reference to the parent AppView giving a pointer to its > > GtkMenu? ...but best would be to determine if there was a way around it. What exactly is the use case? > > gtk_menu_get_attach_widget() doesn't work and gtk_widget_get_parent() > > returns a pointer to some unknown object (I checked it). The menu is not attached to any widget, nor is it strictly tied to the AppView. I'm a bit surprised thet the get_parent() actually returns anything, as menus should be toplevel widgets. You could print the name of the widget with gtk_widget_name() and the type with G_OBJECT_TYPE_NAME() to see what it is. As you see, the menu has no good connection to the view it belongs to, so it's probably better to rethink what you are doing in a different way if possible. -- Kalle Vahlman, zuh at iki.fi Powered by http://movial.fi Interesting stuff at http://syslog.movial.fi
- Previous message: [maemo-developers] Installed perl / PDL on the Nokia 770
- Next message: [maemo-developers] Way to get a reference to parent HildonAppView from its menu
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]