From 2b9c72826a8574385d0360267217cc068e27a910 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 9 Jan 2009 05:13:07 +0000 Subject: Fix a weird UI merging bug. svn path=/branches/kill-bonobo/; revision=37020 --- shell/e-shell-view.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 16c90b6e4e..f1f1ffb476 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -349,16 +349,20 @@ shell_view_toggled (EShellView *shell_view) EShellWindow *shell_window; GtkUIManager *ui_manager; const gchar *basename; + gboolean view_is_active; shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); ui_manager = e_shell_window_get_ui_manager (shell_window); + view_is_active = e_shell_view_is_active (shell_view); basename = shell_view_class->ui_definition; - if (e_shell_view_is_active (shell_view)) + if (view_is_active && priv->merge_id == 0) priv->merge_id = e_load_ui_definition (ui_manager, basename); - else + else if (!view_is_active && priv->merge_id != 0) { gtk_ui_manager_remove_ui (ui_manager, priv->merge_id); + priv->merge_id = 0; + } gtk_ui_manager_ensure_update (ui_manager); } -- cgit