diff src/layout_util.c @ 1279:6248faa9e829

do not translate already translated texts from desktop files
author nadvornik
date Tue, 03 Feb 2009 18:04:10 +0000
parents 4177057ca11b
children 8b89e3ff286b
line wrap: on
line diff
--- a/src/layout_util.c	Tue Feb 03 13:52:20 2009 +0000
+++ b/src/layout_util.c	Tue Feb 03 18:04:10 2009 +0000
@@ -1613,7 +1613,7 @@
 		GList *path;
 		EditorDescription *editor = work->data;
 		GtkActionEntry entry = { editor->key, NULL, editor->name, editor->hotkey, NULL, G_CALLBACK(layout_menu_edit_cb) };
-		gtk_action_group_add_actions(lw->action_group, &entry, 1, lw);
+		gtk_action_group_add_actions(lw->action_group_external, &entry, 1, lw);
 		
 		path = layout_actions_editor_menu_path(editor);
 		layout_actions_editor_add(desc, path, old_path);
@@ -1648,6 +1648,8 @@
 
 	lw->action_group = gtk_action_group_new("MenuActions");
 	gtk_action_group_set_translate_func(lw->action_group, menu_translate, NULL, NULL);
+	lw->action_group_external = gtk_action_group_new("MenuActionsExternal");
+	/* lw->action_group_external contains translated entries, no translate func is required */
 
 	gtk_action_group_add_actions(lw->action_group,
 				     menu_entries, G_N_ELEMENTS(menu_entries), lw);
@@ -1666,6 +1668,7 @@
 	lw->ui_manager = gtk_ui_manager_new();
 	gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE);
 	gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0);
+	gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group_external, 1);
 
 	error = NULL;
 	if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error))