From a19d8d2780fc32811337f7cd7154a21f5043e149 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 17 Dec 2007 01:41:35 +0000 Subject: [PATCH] Using stock menu items when available --- src/common.c | 4 ++++ src/compose.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common.c b/src/common.c index 87d01ea..c2d6a8c 100644 --- a/src/common.c +++ b/src/common.c @@ -15,6 +15,7 @@ +#include #include "common.h" @@ -46,6 +47,9 @@ GtkWidget * common_new_menubar(GtkWindow * window, struct _menubar * mb, else if(p->stock == NULL) menuitem = gtk_menu_item_new_with_mnemonic( p->name); + else if(strncmp(p->stock, "gtk-", 4) == 0) + menuitem = gtk_image_menu_item_new_from_stock( + p->stock, NULL); else { image = gtk_image_new_from_icon_name(p->stock, diff --git a/src/compose.c b/src/compose.c index 2c277fc..6d2f7b6 100644 --- a/src/compose.c +++ b/src/compose.c @@ -47,8 +47,8 @@ static struct _menu _menu_file[] = static struct _menu _menu_edit[] = { - { "_Undo", G_CALLBACK(on_compose_edit_undo), "stock_undo", GDK_Z }, - { "_Redo", G_CALLBACK(on_compose_edit_redo), "stock_redo", GDK_Y }, + { "_Undo", G_CALLBACK(on_compose_edit_undo), GTK_STOCK_UNDO, GDK_Z }, + { "_Redo", G_CALLBACK(on_compose_edit_redo), GTK_STOCK_REDO, GDK_Y }, { "", NULL, NULL, 0 }, { "_Cut", G_CALLBACK(on_compose_edit_cut), GTK_STOCK_CUT, GDK_X }, { "_Copy", G_CALLBACK(on_compose_edit_copy), GTK_STOCK_COPY, GDK_C },