Bo Forslund wrote:
> 
> >
> > void
> > on_button1_clicked                     (GtkButton       *button,
> >                                         gpointer         user_data)
> > {
> <snip>
> 
> the best i got out of this is
> 
> Gtk-WARNING **: gtk_signal_connect(): could not find signal
> "button1_clicked" in the `GtkOptionMenu' class ancestry

That example was intended as an example for getting the current setting of
the option menu from any signal handler, in this case when a button
is clicked.

 
> >   window1 = create_window1 ();
> >   option_menu = lookup_widget (window1, "optionmenu1");
> >   gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (option_menu)->menu),
> >                       "deactivate", GTK_SIGNAL_FUNC (on_option_selected),
> >                       NULL);
> >
> 
> Where do i put this?  In callbacs.c? What signal is supposed to fire it
> up?

In main.c, after the call to create the window like create_window1() above.

 
> If I have an option menu with items A, B, C, and select C,  is it told as
> item 2 ( maybe 3 ) or as C is selected. If A, B or C is selected, how do i
> make the program realize what item was selected.

The call to g_list_index (menu_shell->children, active_item) will return the
index of the item, i.e. 2.

Damon



+---------------------------------------------------------------------+
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