Skip to content

Commit

Permalink
do not translate already translated texts from desktop files
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Feb 3, 2009
1 parent e03f199 commit b93be6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,7 @@ void layout_style_set(LayoutWindow *lw, gint style, const gchar *order)
if (lw->ui_manager) g_object_unref(lw->ui_manager);
lw->ui_manager = NULL;
lw->action_group = NULL;
lw->action_group_external = NULL;

gtk_container_remove(GTK_CONTAINER(lw->main_box), lw->group_box);
lw->group_box = NULL;
Expand Down
5 changes: 4 additions & 1 deletion src/layout_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ static void layout_actions_setup_editors(LayoutWindow *lw)
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);
Expand Down Expand Up @@ -1648,6 +1648,8 @@ void layout_actions_setup(LayoutWindow *lw)

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);
Expand All @@ -1666,6 +1668,7 @@ void layout_actions_setup(LayoutWindow *lw)
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))
Expand Down
1 change: 1 addition & 0 deletions src/typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ struct _LayoutWindow
/* menus, path selector */

GtkActionGroup *action_group;
GtkActionGroup *action_group_external;
GtkUIManager *ui_manager;

GtkWidget *path_entry;
Expand Down

0 comments on commit b93be6e

Please sign in to comment.