# HG changeset patch # User nadvornik # Date 1252769484 0 # Node ID 7a6f3ffa036ac5e9d7ba07923fb140d6cad34e59 # Parent 2ce6b6bfd40a0930c0f9b2cd6a1ceb7839d76e11 fixed reloading of editors diff -r 2ce6b6bfd40a -r 7a6f3ffa036a src/layout_util.c --- a/src/layout_util.c Wed Sep 09 18:16:09 2009 +0000 +++ b/src/layout_util.c Sat Sep 12 15:31:24 2009 +0000 @@ -1804,6 +1804,11 @@ GList *old_path; GString *desc; + if (lw->ui_editors_id) + { + gtk_ui_manager_remove_ui(lw->ui_manager, lw->ui_editors_id); + } + if (lw->action_group_editors) { gtk_ui_manager_remove_action_group(lw->ui_manager, lw->action_group_editors); @@ -1988,19 +1993,6 @@ work = layout_window_list; -#if 0 -/* it should be enough to remove the old editors after the new ones are loaded, in layout_actions_setup_editors */ - while (work) - { - LayoutWindow *lw = work->data; - work = work->next; - - gtk_ui_manager_remove_ui(lw->ui_manager, lw->ui_editors_id); - gtk_ui_manager_remove_action_group(lw->ui_manager, lw->action_group_editors); - g_object_unref(lw->action_group_editors); - lw->action_group_editors = NULL; - } -#endif editor_table_clear(); layout_editors_reload_idle_id = g_idle_add(layout_editors_reload_idle_cb, NULL); }