GTK-Critical error compiling a smart program (with menu)
Hi
First time sorry for my english is not soo good, i try to compile the next source : Code:
#include <gtk/gtk.h> g++ -Wall -g -c fdialog.c -export-dynamic `pkg-config --cflags --libs gtk+-2.0` `gtk-config --cflags` `gtk-config --libs` g++ -o fdialog fdialog.o `pkg-config --cflags --libs gtk+-2.0` `gtk-config --cflags` `gtk-config --libs` and it compile without errors, but when i try to run it, it can be run without menubar, and become this error message: (fdialog:6369): Gtk-CRITICAL **: gtk_menu_shell_insert: assertion `GTK_IS_MENU_SHELL (menu_shell)' failed (fdialog:6369): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed (fdialog:6369): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed is this a bug ? or how can i resolve this problem? maybe someone had the same problem. Thanks for your help ! Robert |
first of all, you have to add widgets to your boxes and then add the boxes to the final window, that's the last thing you gotta do when setting up your gui.
then you have to show only your window, which holds all your widgets, above you are showing all widgets independently. lastly, i don't think you've added the menu widget to your window, so that might be the problem, you have declared and initialized it, but have not added to the gui. i will post again after i have tried this myself when i get home. hope that helps temporarily. Enrique |
All times are GMT -5. The time now is 05:09 AM. |