gettext and gtk_item_factory_create_items
- From: Ayose <zubzet yahoo es>
- To: gtk-app-devel-list gnome org
- Subject: gettext and gtk_item_factory_create_items
- Date: Tue, 4 Jun 2002 15:53:05 +0000
Hi people.
Can I use gettext with gtk_item_factory_create_items ?
For instance, I have this menu:
static GtkItemFactoryEntry menu_items[] = {
{ "/_File", NULL, NULL, 0, "<Branch>", NULL },
{ "/File/_New", "<control>N", NULL, 0, "<StockItem>", GTK_STOCK_NEW},
{ "/File/_Open", "<control>O", NULL, 0, "<StockItem>", GTK_STOCK_OPEN},
{ "/File/_Save", "<control>S", NULL, 0, "<StockItem>", GTK_STOCK_SAVE},
[...]
And then I call
gtk_item_factory_create_items (item_factory,
sizeof(menu_items)/sizeof(menu_items[0]),
menu_items,
NULL);
The function works well, but I want to use gettext with every menu
entry. If I type something like
#define _(s) gettext(s)
[...]
{ _("/_File"), NULL, NULL, 0, "<Branch>", NULL },
{ _("/File/_New"), "<control>N", NULL, 0, "<StockItem>", GTK_STOCK_NEW},
[...]
I get the error:
gui.c:22: initializer element is not constant
gui.c:22: (near initialization for `menu_items[0].path')
[...]
Is there some smart way for using gettext here?
--
Ayose Cazorla León
Debian GNU/Linux - setepo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]