From: Vladimir Nadvornik Date: Sat, 12 Sep 2009 15:31:24 +0000 (+0000) Subject: fixed reloading of editors X-Git-Tag: v1.0.0~58 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=50f55547a981a56f3baa1cd33bc2f3c4139bd695 fixed reloading of editors --- diff --git a/src/layout_util.c b/src/layout_util.c index e7515c58..b8538520 100644 --- a/src/layout_util.c +++ b/src/layout_util.c @@ -1804,6 +1804,11 @@ static void layout_actions_setup_editors(LayoutWindow *lw) 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 @@ void layout_editors_reload_start(void) 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); }