[krb5-auth-dialog] use gtk_image_menu_item_new_from_stock for stock menu entries



commit 4b6d744ac0b6eecd964bcf41d80d2d272d6c0726
Author: Guido Günther <agx sigxcpu org>
Date:   Sat Jun 13 17:37:45 2009 +0200

    use gtk_image_menu_item_new_from_stock for stock menu entries

 ChangeLog              |    5 +++++
 src/krb5-auth-applet.c |   16 ++++------------
 2 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c1f2623..2c3f64b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jun 13 17:39:07 CEST 2009 Guido Günther <agx sigxcpu org>
+
+	* src/krb5-auth-applet.c (ka_applet_create_context_menu): use
+	gtk_image_menu_item_new_from_stock for stock menu entries
+
 Sat Jun 13 17:14:34 CEST 2009 Guido Günther <agx sigxcpu org>
 
 	* po/krb5-auth-dialog.pot: remove 
diff --git a/src/krb5-auth-applet.c b/src/krb5-auth-applet.c
index f98d175..d59dac8 100644
--- a/src/krb5-auth-applet.c
+++ b/src/krb5-auth-applet.c
@@ -658,37 +658,29 @@ ka_applet_create_context_menu (KaApplet* applet)
 	ka_applet_menu_add_separator_item (menu);
 
 	/* Preferences */
-	menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences"));
+	menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, NULL);
 	g_signal_connect (G_OBJECT (menu_item), "activate",
 			  G_CALLBACK (ka_applet_cb_preferences), applet);
-	image = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
 
 	/* About item */
-	menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Help"));
+	menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, NULL);
 	g_signal_connect (G_OBJECT (menu_item), "activate",
 			  G_CALLBACK (ka_applet_cb_show_help), applet);
-	image = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_MENU);
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
 
 	/* About item */
-	menu_item = gtk_image_menu_item_new_with_mnemonic (_("_About"));
+	menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, NULL);
 	g_signal_connect (G_OBJECT (menu_item), "activate",
 			  G_CALLBACK (ka_applet_cb_about_dialog), applet);
-	image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU);
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
 
 	ka_applet_menu_add_separator_item (menu);
 
 	/* Quit */
-	menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Quit"));
+	menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, NULL);
 	g_signal_connect (G_OBJECT (menu_item), "activate",
 			  G_CALLBACK (ka_applet_cb_quit), applet);
-	image = gtk_image_new_from_stock (GTK_STOCK_QUIT, GTK_ICON_SIZE_MENU);
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
 
 	gtk_widget_show_all (menu);



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