Use "activate" rather than "clicked" for menu items

This commit is contained in:
Christian Dywan 2010-03-31 17:29:53 +02:00 committed by Javier Jardón
parent 187e49992d
commit 298f1ea9f6
2 changed files with 4 additions and 4 deletions

View File

@ -328,7 +328,7 @@ main (int argc, char *argv[])
menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_menu_item_new_with_mnemonic ("_Quit");
g_signal_connect (menuitem, "clicked", G_CALLBACK (quit_cb), window);
g_signal_connect (menuitem, "activate", G_CALLBACK (quit_cb), window);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);

View File

@ -172,12 +172,12 @@ create_menubar (GtkWindow *window)
menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL);
g_signal_connect (menuitem, "clicked", G_CALLBACK (print_hello), window);
g_signal_connect (menuitem, "activate", G_CALLBACK (print_hello), window);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
menuitem = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, NULL);
g_signal_connect (menuitem, "clicked", G_CALLBACK (gtk_main_quit), window);
g_signal_connect (menuitem, "activate", G_CALLBACK (gtk_main_quit), window);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
menuitem = gtk_menu_item_new_with_mnemonic ("O_K");
@ -190,7 +190,7 @@ create_menubar (GtkWindow *window)
menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, NULL);
g_signal_connect (menuitem, "clicked", G_CALLBACK (print_hello), window);
g_signal_connect (menuitem, "activate", G_CALLBACK (print_hello), window);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
return menubar;