aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-popup-menu.c
diff options
context:
space:
mode:
authorGediminas Paulauskas <menesis@delfi.lt>2001-04-05 08:26:43 +0800
committerGediminas Paulauskas <menesis@src.gnome.org>2001-04-05 08:26:43 +0800
commitc77e63e2cc9d19f865589da454e8810f8804aedf (patch)
tree213ff7264cb70cfb1ec0cdbd31655c64a0985f58 /widgets/misc/e-popup-menu.c
parent7210c85ade19359bfb711b66780a47700742b0fa (diff)
downloadgsoc2013-evolution-c77e63e2cc9d19f865589da454e8810f8804aedf.tar.gz
gsoc2013-evolution-c77e63e2cc9d19f865589da454e8810f8804aedf.tar.zst
gsoc2013-evolution-c77e63e2cc9d19f865589da454e8810f8804aedf.zip
Some small header cleanups & fixes, and fix to translate all popup menus
(woohoo!): 2001-04-05 Gediminas Paulauskas <menesis@delfi.lt> * gal/widgets/e-popup-menu.c: Copied gnome_app_helper_gettext function here, and use it for translating menu names (they are passed from app as well as from gal in arrays with N_(), and domains differ). svn path=/trunk/; revision=9190
Diffstat (limited to 'widgets/misc/e-popup-menu.c')
-rw-r--r--widgets/misc/e-popup-menu.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index 4e2ff17378..da28926677 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -17,9 +17,35 @@ nnn *
#include <gtk/gtksignal.h>
#include <libgnomeui/gtkpixmapmenuitem.h>
#include <libgnomeui/gnome-stock.h>
+
#include "e-popup-menu.h"
#include "e-gui-utils.h"
-#include "gal/util/e-i18n.h"
+
+#include <libgnome/gnome-i18n.h>
+
+#ifndef GNOME_APP_HELPER_H
+/* Copied this i18n function to use for the same purpose */
+
+#ifdef ENABLE_NLS
+#define L_(x) gnome_app_helper_gettext(x)
+
+static gchar *
+gnome_app_helper_gettext (const gchar *str)
+{
+ char *s;
+
+ s = gettext (str);
+ if ( s == str )
+ s = dgettext (PACKAGE, str);
+
+ return s;
+}
+
+#else
+#define L_(x) x
+#endif
+
+#endif
/*
* Creates an item with an optional icon
@@ -86,7 +112,7 @@ e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_m
if ((!(seperator && last_item_seperator)) && !(menu_list [i].disable_mask & hide_mask)) {
GtkWidget *item;
- item = make_item (menu, seperator ? "" : _(menu_list[i].name), menu_list[i].pixname);
+ item = make_item (menu, seperator ? "" : L_(menu_list[i].name), menu_list[i].pixname);
gtk_menu_append (menu, item);
if (!menu_list[i].submenu) {