changeset 1745:7a6f3ffa036a

fixed reloading of editors
author nadvornik
date Sat, 12 Sep 2009 15:31:24 +0000
parents 2ce6b6bfd40a
children a0e47436b552
files src/layout_util.c
diffstat 1 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }