Using stock menu items when available
This commit is contained in:
parent
19d477fbe3
commit
a19d8d2780
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,6 +47,9 @@ GtkWidget * common_new_menubar(GtkWindow * window, struct _menubar * mb,
|
||||||
else if(p->stock == NULL)
|
else if(p->stock == NULL)
|
||||||
menuitem = gtk_menu_item_new_with_mnemonic(
|
menuitem = gtk_menu_item_new_with_mnemonic(
|
||||||
p->name);
|
p->name);
|
||||||
|
else if(strncmp(p->stock, "gtk-", 4) == 0)
|
||||||
|
menuitem = gtk_image_menu_item_new_from_stock(
|
||||||
|
p->stock, NULL);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
image = gtk_image_new_from_icon_name(p->stock,
|
image = gtk_image_new_from_icon_name(p->stock,
|
||||||
|
|
|
@ -47,8 +47,8 @@ static struct _menu _menu_file[] =
|
||||||
|
|
||||||
static struct _menu _menu_edit[] =
|
static struct _menu _menu_edit[] =
|
||||||
{
|
{
|
||||||
{ "_Undo", G_CALLBACK(on_compose_edit_undo), "stock_undo", GDK_Z },
|
{ "_Undo", G_CALLBACK(on_compose_edit_undo), GTK_STOCK_UNDO, GDK_Z },
|
||||||
{ "_Redo", G_CALLBACK(on_compose_edit_redo), "stock_redo", GDK_Y },
|
{ "_Redo", G_CALLBACK(on_compose_edit_redo), GTK_STOCK_REDO, GDK_Y },
|
||||||
{ "", NULL, NULL, 0 },
|
{ "", NULL, NULL, 0 },
|
||||||
{ "_Cut", G_CALLBACK(on_compose_edit_cut), GTK_STOCK_CUT, GDK_X },
|
{ "_Cut", G_CALLBACK(on_compose_edit_cut), GTK_STOCK_CUT, GDK_X },
|
||||||
{ "_Copy", G_CALLBACK(on_compose_edit_copy), GTK_STOCK_COPY, GDK_C },
|
{ "_Copy", G_CALLBACK(on_compose_edit_copy), GTK_STOCK_COPY, GDK_C },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user