[maemo-developers] [maemo-developers] GTK UI Manager and Maemo
From: Luca Donaggio donaggio at gmail.comDate: Mon Dec 5 17:58:54 EET 2005
- Previous message: [maemo-developers] Re: hildon-fmmm bindings
- Next message: [maemo-developers] GTK UI Manager and Maemo
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm Hildonizing a GTK2 application which uses ui_manager_* functions to
build its menu and I'm having the following problem:
each menu, upon its creation, is attached to a parent GtkMenuBar and It
seems that I can't re-assign it to the GtkMenu built in in my HildonAppView.
That's what I do:
mainmenu = hildon_appview_get_menu (HILDON_APPVIEW (window));
gtk_menu_append (mainmenu, GTK_MENU (gtk_ui_manager_get_widget (ui,
"/MenuBar/FileMenu")));
the app bilds just fine, but when I launch it:
$ run-standalone.sh ./myapp
GLIB WARNING ** Gtk - Can't set a parent on widget which has a parent
and when I click on the app title to show the menu, it crashes and core
dumps:
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_realize: assertion
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_realize: assertion
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_real_map: assertion
`GTK_WIDGET_REALIZED (widget) == TRUE' failed
myapp[28154]: GLIB CRITICAL ** Gdk - gdk_window_invalidate_rect: assertion
`window != NULL' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_realize: assertion
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_real_map: assertion
`GTK_WIDGET_REALIZED (widget) == TRUE' failed
myapp[28154]: GLIB CRITICAL ** Gdk - gdk_window_invalidate_rect: assertion
`window != NULL' failed
myapp[28154]: GLIB CRITICAL ** Gdk - gdk_window_show: assertion
`GDK_IS_WINDOW (window)' failed
myapp[28154]: GLIB CRITICAL ** Gdk - gdk_window_invalidate_rect: assertion
`window != NULL' failed
myapp[28154]: GLIB CRITICAL ** Gdk - gdk_window_get_origin: assertion
`window != NULL' failed
myapp[28154]: GLIB CRITICAL ** Gdk - gdk_window_get_origin: assertion
`window != NULL' failed
myapp[28154]: GLIB WARNING ** Gtk - Menu not on screen
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_event: assertion
`WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_event: assertion
`WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_event: assertion
`WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
myapp[28154]: GLIB CRITICAL ** Gtk - gtk_widget_event: assertion
`WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
myapp[28154]: GLIB ERROR ** Gtk - file gtkcontainer.c: line 2649
(gtk_container_propagate_expose): assertion failed: (child->parent ==
GTK_WIDGET (container))
aborting...
/usr/bin/run-standalone.sh: line 16: 28154 Aborted (core
dumped) $*
looking at the on-line tutorials on maemo.org, it seems that ui_manager
method to build menu is supported, but it's not explained hot to get it to
work!
Any idea, or does anyone has already used this method before?
P.S.: adding toolbars created with this very same method works pretty well!
Luca D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20051205/b23cc63f/attachment.htm
- Previous message: [maemo-developers] Re: hildon-fmmm bindings
- Next message: [maemo-developers] GTK UI Manager and Maemo
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
