Dynamic Menus?



Hi,

I have provided a test case as an attachment.What I am trying to do is
dynamically create submenus by handling "select" and "deselect" events.
I have two problems:

1) The actual sub menu is not being shown. It is shown only if I click
on the menu item.
2) It crashes if I double click on a menu item with the following
backtrace:

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x407b6541 in raise () from /lib/tls/libc.so.6
#2  0x407b7dbb in abort () from /lib/tls/libc.so.6
#3  0x4073a1a0 in g_logv () from /opt/gnome/lib/libglib-2.0.so.0
#4  0x4073a1e5 in g_log () from /opt/gnome/lib/libglib-2.0.so.0
#5  0x4073a33c in g_return_if_fail_warning ()
from /opt/gnome/lib/libglib-2.0.so.0
#6  0x40263df4 in gtk_widget_event ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#7  0x4016ffc5 in gtk_propagate_event ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#8  0x4017045f in gtk_main_do_event ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#9  0x4037ae4a in gdk_screen_get_setting ()
from /opt/gnome/lib/libgdk-x11-2.0.so.0
#10 0x407325dc in g_main_context_dispatch ()
from /opt/gnome/lib/libglib-2.0.so.0
#11 0x40732c9b in g_main_context_dispatch ()
from /opt/gnome/lib/libglib-2.0.so.0
#12 0x40733187 in g_main_loop_run ()
from /opt/gnome/lib/libglib-2.0.so.0
#13 0x4016f5d1 in gtk_main () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#14 0x08049161 in main (argc=1, argv=0xbfd92174) at main.c:111


Do you have any idea what am I doing wrong and what is the proper way to
create menus dynamically?

Cheers,
Ivan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]