Mercurial > geeqie.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
1278:c5852c543775 | 1279:6248faa9e829 |
---|---|
1611 while(work) | 1611 while(work) |
1612 { | 1612 { |
1613 GList *path; | 1613 GList *path; |
1614 EditorDescription *editor = work->data; | 1614 EditorDescription *editor = work->data; |
1615 GtkActionEntry entry = { editor->key, NULL, editor->name, editor->hotkey, NULL, G_CALLBACK(layout_menu_edit_cb) }; | 1615 GtkActionEntry entry = { editor->key, NULL, editor->name, editor->hotkey, NULL, G_CALLBACK(layout_menu_edit_cb) }; |
1616 gtk_action_group_add_actions(lw->action_group, &entry, 1, lw); | 1616 gtk_action_group_add_actions(lw->action_group_external, &entry, 1, lw); |
1617 | 1617 |
1618 path = layout_actions_editor_menu_path(editor); | 1618 path = layout_actions_editor_menu_path(editor); |
1619 layout_actions_editor_add(desc, path, old_path); | 1619 layout_actions_editor_add(desc, path, old_path); |
1620 | 1620 |
1621 string_list_free(old_path); | 1621 string_list_free(old_path); |
1646 | 1646 |
1647 if (lw->ui_manager) return; | 1647 if (lw->ui_manager) return; |
1648 | 1648 |
1649 lw->action_group = gtk_action_group_new("MenuActions"); | 1649 lw->action_group = gtk_action_group_new("MenuActions"); |
1650 gtk_action_group_set_translate_func(lw->action_group, menu_translate, NULL, NULL); | 1650 gtk_action_group_set_translate_func(lw->action_group, menu_translate, NULL, NULL); |
1651 lw->action_group_external = gtk_action_group_new("MenuActionsExternal"); | |
1652 /* lw->action_group_external contains translated entries, no translate func is required */ | |
1651 | 1653 |
1652 gtk_action_group_add_actions(lw->action_group, | 1654 gtk_action_group_add_actions(lw->action_group, |
1653 menu_entries, G_N_ELEMENTS(menu_entries), lw); | 1655 menu_entries, G_N_ELEMENTS(menu_entries), lw); |
1654 gtk_action_group_add_toggle_actions(lw->action_group, | 1656 gtk_action_group_add_toggle_actions(lw->action_group, |
1655 menu_toggle_entries, G_N_ELEMENTS(menu_toggle_entries), lw); | 1657 menu_toggle_entries, G_N_ELEMENTS(menu_toggle_entries), lw); |
1664 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw); | 1666 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw); |
1665 | 1667 |
1666 lw->ui_manager = gtk_ui_manager_new(); | 1668 lw->ui_manager = gtk_ui_manager_new(); |
1667 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); | 1669 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); |
1668 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); | 1670 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); |
1671 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group_external, 1); | |
1669 | 1672 |
1670 error = NULL; | 1673 error = NULL; |
1671 if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error)) | 1674 if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error)) |
1672 { | 1675 { |
1673 g_message("building menus failed: %s", error->message); | 1676 g_message("building menus failed: %s", error->message); |