changeset 4602:4128761bacb8

[gaim-migrate @ 4889] I18N menu fixes by Bjoern Voigt. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 22 Feb 2003 18:15:29 +0000
parents 203741ac86b3
children 6316a0a33680
files src/gtkconv.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sat Feb 22 17:31:59 2003 +0000
+++ b/src/gtkconv.c	Sat Feb 22 18:15:29 2003 +0000
@@ -124,6 +124,7 @@
 								  const char *name, int pos);
 static void tab_complete(struct gaim_conversation *conv);
 static void update_send_as_selection(struct gaim_window *win);
+static char *item_factory_translate_func (const char *path, gpointer func_data);
 
 /**************************************************************************
  * Callbacks
@@ -2423,9 +2424,15 @@
 	{ N_("/Options/Enable _Sounds"), NULL, menu_sounds_cb, 0, "<CheckItem>" },
 };
 
-static const int menu_item_count =
+static const int menu_item_count = 
 	sizeof(menu_items) / sizeof(*menu_items);
 
+static char *
+item_factory_translate_func (const char *path, gpointer func_data)
+{
+	return _(path);
+}
+
 static GtkWidget *
 setup_menubar(struct gaim_window *win)
 {
@@ -2440,6 +2447,10 @@
 
 	item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", NULL);
 
+	gtk_item_factory_set_translate_func (item_factory,
+					     item_factory_translate_func,
+					     NULL, NULL);
+	
 	gtk_item_factory_create_items(item_factory, menu_item_count,
 								  menu_items, win);