> how can, for example an if statment, depend of the option/value of an
> optionmenu
> 
> i don't find the function to get the option/value from this kind of widget

It's sorta painful to do this, unfortunately.  Here's some magic code (from
Owen Taylor) to get it out.

static gint
my_option_menu_get_history (GtkOptionMenu *option_menu)
{
        GtkWidget *active_widget;

        g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), -1);

        active_widget = gtk_menu_get_active (GTK_MENU (option_menu->menu));

        if (active_widget)
                return g_list_index (GTK_MENU_SHELL (option_menu->menu)->children,
                                     active_widget);
        else
                return -1;
}

-Jonathan



+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to