[evolution/webkit] Bug #634403 - Mails Label popup menu is not updated properly



commit 5544143be93e410a3683f0561e3cabcf797e0f40
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jan 19 14:56:35 2011 +0100

    Bug #634403 - Mails Label popup menu is not updated properly

 e-util/e-plugin-ui.c                     |    4 +++-
 modules/mail/e-mail-shell-view-actions.c |    1 +
 modules/mail/e-mail-shell-view.c         |    1 +
 plugins/templates/templates.c            |    1 +
 shell/e-shell-view.c                     |    1 +
 shell/e-shell-window-actions.c           |    2 ++
 widgets/misc/e-attachment-view.c         |    1 +
 7 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-plugin-ui.c b/e-util/e-plugin-ui.c
index c79220b..60ad884 100644
--- a/e-util/e-plugin-ui.c
+++ b/e-util/e-plugin-ui.c
@@ -344,8 +344,10 @@ plugin_ui_disable_manager (EPluginUIHook *hook,
 		merge_id = GPOINTER_TO_UINT (data);
 
 		/* Merge ID could be 0 if the plugin is disabled. */
-		if (merge_id > 0)
+		if (merge_id > 0) {
 			gtk_ui_manager_remove_ui (ui_manager, merge_id);
+			gtk_ui_manager_ensure_update (ui_manager);
+		}
 
 		if (remove)
 			g_hash_table_remove (hash_table, id);
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 04f8dcb..1342e8a 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -1819,6 +1819,7 @@ e_mail_shell_view_update_popup_labels (EMailShellView *mail_shell_view)
 	/* Unmerge the previous menu items. */
 	gtk_ui_manager_remove_ui (ui_manager, merge_id);
 	e_action_group_remove_all_actions (action_group);
+	gtk_ui_manager_ensure_update (ui_manager);
 
 	mail_shell_content = mail_shell_view->priv->mail_shell_content;
 	mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index ed63437..1754fbb 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -193,6 +193,7 @@ mail_shell_view_toggled (EShellView *shell_view)
 			ui_manager, priv->merge_id);
 	} else if (!view_is_active && priv->merge_id != 0) {
 		gtk_ui_manager_remove_ui (ui_manager, priv->merge_id);
+		gtk_ui_manager_ensure_update (ui_manager);
 		priv->merge_id = 0;
 	}
 
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 9b664bb..3e3bb49 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -780,6 +780,7 @@ update_actions_cb (EShellView *shell_view)
 
 	gtk_ui_manager_remove_ui (ui_manager, merge_id);
 	e_action_group_remove_all_actions (action_group);
+	gtk_ui_manager_ensure_update (ui_manager);
 
 	if (!plugin_enabled)
 		return;
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index fafab51..cb682b7 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -730,6 +730,7 @@ shell_view_toggled (EShellView *shell_view)
 	} else if (!view_is_active && priv->merge_id != 0) {
 		e_plugin_ui_disable_manager (ui_manager, id);
 		gtk_ui_manager_remove_ui (ui_manager, priv->merge_id);
+		gtk_ui_manager_ensure_update (ui_manager);
 		priv->merge_id = 0;
 	}
 
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 9491831..6547ba6 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -2252,6 +2252,7 @@ e_shell_window_update_view_menu (EShellWindow *shell_window)
 	/* Unmerge the previous menu. */
 	gtk_ui_manager_remove_ui (ui_manager, merge_id);
 	e_action_group_remove_all_actions (action_group);
+	gtk_ui_manager_ensure_update (ui_manager);
 
 	/* We have a view ID, so forge ahead. */
 	count = gal_view_collection_get_count (view_collection);
@@ -2362,6 +2363,7 @@ e_shell_window_update_search_menu (EShellWindow *shell_window)
 	/* Unmerge the previous menu. */
 	gtk_ui_manager_remove_ui (ui_manager, merge_id);
 	e_action_group_remove_all_actions (action_group);
+	gtk_ui_manager_ensure_update (ui_manager);
 
 	rule = e_rule_context_next_rule (context, NULL, source);
 	while (rule != NULL) {
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 5094a54..8958ad0 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -716,6 +716,7 @@ attachment_view_update_actions (EAttachmentView *view)
 	gtk_ui_manager_remove_ui (priv->ui_manager, priv->merge_id);
 	action_group = e_attachment_view_get_action_group (view, "openwith");
 	e_action_group_remove_all_actions (action_group);
+	gtk_ui_manager_ensure_update (priv->ui_manager);
 
 	if (attachment == NULL || busy)
 		return;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]