aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-popup-menu.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-03 04:32:19 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-03 04:32:19 +0800
commit874390a8376202f138266bdd641e810db93a3136 (patch)
tree1e19721ead0b36bade4cc011313b0c70b5c71a5d /widgets/misc/e-popup-menu.c
parentcad5e25f863f3bf643a2c7a7b4a77be0bc9db130 (diff)
downloadgsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.gz
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.bz2
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.lz
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.xz
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.zst
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.zip
Added this function that lets you specify the translation domain.
2002-05-02 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-popup-menu.c, gal/widgets/e-popup-menu.h (e_popup_menu_create_with_domain): Added this function that lets you specify the translation domain. From gal/e-table/ChangeLog: 2002-05-02 Christopher James Lahey <clahey@ximian.com> * e-table-click-to-add.c (finish_editing): Add horizontal dividers here too. * e-table-config.c (create_global_store): Translate column headers here. * e-table-header-item.c (ethi_header_context_menu): Use e_popup_menu_create_with_domain here. * e-table-header-utils.c (e_table_header_draw_button): Translate from utf8 here before drawing. * e-table-memory-store.c, e-table-memory-store.h (e_table_memory_store_insert_adopt_array): Changed the name of this function from e_table_memory_store_insert_adopt. (e_table_memory_store_insert_adopt): Added this function which takes a ... list. * e-table-utils.c (et_col_spec_to_col): Translate column titles to utf8 here. svn path=/trunk/; revision=16668
Diffstat (limited to 'widgets/misc/e-popup-menu.c')
-rw-r--r--widgets/misc/e-popup-menu.c46
1 files changed, 20 insertions, 26 deletions
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index 86a07a74c8..1ce38c4d02 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -40,30 +40,6 @@
#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
*/
@@ -99,7 +75,25 @@ make_item (GtkMenu *menu, GtkMenuItem *item, const char *name, GtkWidget *pixmap
}
GtkMenu *
-e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_mask, void *default_closure)
+e_popup_menu_create (EPopupMenu *menu_list,
+ guint32 disable_mask,
+ guint32 hide_mask,
+ void *default_closure)
+{
+ return e_popup_menu_create_with_domain (menu_list,
+ disable_mask,
+ hide_mask,
+ default_closure,
+ NULL);
+}
+
+
+GtkMenu *
+e_popup_menu_create_with_domain (EPopupMenu *menu_list,
+ guint32 disable_mask,
+ guint32 hide_mask,
+ void *default_closure,
+ const char *domain)
{
GtkMenu *menu = GTK_MENU (gtk_menu_new ());
GSList *group = NULL;
@@ -133,7 +127,7 @@ e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_m
if (menu_list[i].is_radio)
group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item));
- make_item (menu, GTK_MENU_ITEM (item), L_(menu_list[i].name), menu_list[i].pixmap_widget);
+ make_item (menu, GTK_MENU_ITEM (item), dgettext(domain, menu_list[i].name), menu_list[i].pixmap_widget);
} else {
item = gtk_menu_item_new ();
}