submenu signal not working
- From: Denis <world of micro world gmail com>
- To: GTK-app-devel <gtk-app-devel-list gnome org>
- Subject: submenu signal not working
- Date: Tue, 10 May 2005 16:31:23 +0400
Signal of submenu not called while i not clicked to
main_menu->sub_menu->sum_menu_item
but i what to click menu_menu_button->sub_menu_item
GtkWidget* menu;
GtkWidget* menu_item;
GtkWidget* sub_menu;
menu = gtk_menu_new();
menu_item = gtk_image_menu_item_new_with_label("Text");
g_signal_connect (menu_item, "activate", G_CALLBACK
(menu_item_activated_signal), NULL);
gtk_widget_show (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
{
sub_menu = gtk_menu_new();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item),sub_menu);
menu_item = gtk_image_menu_item_new_with_label("Test");
image=
gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
g_signal_connect (menu_item, "activate", G_CALLBACK
(menu_item_activated_signal), NULL); //this is not called
gtk_widget_show (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]