[Glade-users] Problem with realizing callbacks from CheckMenuItem with Glade 3.6.7

Daniel Matthes matthes at ftz.htwk-leipzig.de
Thu Mar 25 11:31:16 EDT 2010


I've created with Glade a CheckMenuItem "EKG_I" with a signal handler "cb_handler_bio_signals" an the user data "hbox1". This widget should be shown or hide according to the active state of the CheckMenuItem.

Here is my callback function:

void cb_handle_bio_signals( GtkCheckMenuItem *check_menu_item, gpointer data )
{
    gboolean test;

    test = gtk_check_menu_item_get_active( check_menu_item );
    if ( test == TRUE )
        gtk_widget_show( data );
    else
        gtk_widget_hide( data );

    return;
}

After compiling my program works exept for the callback routine. On the command line I can read:

Gtk-CRITICAL **: gtk_check_menu_item_get_active: assertion `GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed

What is wrong?

When I change the user data to "EKG_I" instead of "hbox1". Ther is no error. In this case expectedly the CheckMenuItem will be shown or hide.

Regards Daniel


--
HTWK Leipzig
University of Applied Sciences
Faculty of Electrical Engineering and Information Technology

Waechterstraße 13
D-04107 Leipzig

Fon:  +49 (0) 341 3076 1136
Fax:  +49 (0) 341 3076 1220
Mail: matthes at ftz-leipzig.de


More information about the Glade-users mailing list