option menu

Hi All,

1 question regarding Gtkoptionmenu. I am using gtk-1.2. I connected the option menu to a released signal. However when I tried activating the option menu, there wasn't any response. Is there anything wrong with my codes or did I just used the wrong signal.

The routine gtk_option_menu_get_history is from gtk-2.0. I simply dumped it into my callbacks.

gtk_signal_connect (GTK_OBJECT (optionmenu1), "released", GTK_SIGNAL_FUNC (onHTTP_on1_released), NULL);

onHTTP_on1_released              (GtkButton *button,
                                  gpointer user_data)
  gint item_index;
  extern GtkWidget *g_tcp_window; GtkWidget *spin2;

item_index = gtk_option_menu_get_history (GTK_OPTION_MENU(button)); g_print ("http_on_option, item index: %d\n", item_index);

 spin2 = lookup_widget(g_tcp_window,"spinbutton2");
 if (item_index == 1)
    gtk_widget_set_sensitive(spin2, TRUE);
 }else if (item_index == 0) {
    gtk_widget_set_sensitive(spin2, FALSE);


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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