[gtk+/gtk-2-90] Use "activate" rather than "clicked" for menu items



commit f9c8300687608c053357120665fe636d627db208
Author: Christian Dywan <christian twotoasts de>
Date:   Wed Mar 31 17:29:53 2010 +0200

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

 tests/testsocket.c        |    2 +-
 tests/testsocket_common.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/testsocket.c b/tests/testsocket.c
index 657fa8a..103b965 100644
--- a/tests/testsocket.c
+++ b/tests/testsocket.c
@@ -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);
 
diff --git a/tests/testsocket_common.c b/tests/testsocket_common.c
index d2e1d2f..f6937b8 100644
--- a/tests/testsocket_common.c
+++ b/tests/testsocket_common.c
@@ -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;



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