Bug 269852 - Label should be on "Message" menu when mail is selected
Closes https://bugzilla.gnome.org/show_bug.cgi?id=269852
This commit is contained in:
@ -89,6 +89,14 @@
|
||||
<menuitem action="mail-flag-clear"/>
|
||||
<menuitem action="mail-flag-completed"/>
|
||||
<separator/>
|
||||
<menu action='mail-label-menu'>
|
||||
<menuitem action='mail-label-none'/>
|
||||
<separator/>
|
||||
<placeholder name='mail-label-actions'/>
|
||||
<separator/>
|
||||
<menuitem action='mail-label-new'/>
|
||||
</menu>
|
||||
<separator/>
|
||||
<menuitem action="mail-mark-ignore-thread-whole"/>
|
||||
<menuitem action="mail-mark-ignore-thread-sub"/>
|
||||
<menuitem action="mail-mark-unignore-thread-whole"/>
|
||||
|
||||
@ -2493,9 +2493,8 @@ e_mail_shell_view_update_popup_labels (EMailShellView *mail_shell_view)
|
||||
GtkActionGroup *action_group;
|
||||
GtkTreeIter iter;
|
||||
GPtrArray *uids;
|
||||
const gchar *path;
|
||||
const gchar *main_menu_path, *popup_menu_path;
|
||||
gboolean valid;
|
||||
guint merge_id;
|
||||
gint ii = 0;
|
||||
|
||||
g_return_if_fail (E_IS_MAIL_SHELL_VIEW (mail_shell_view));
|
||||
@ -2514,11 +2513,12 @@ e_mail_shell_view_update_popup_labels (EMailShellView *mail_shell_view)
|
||||
E_MAIL_UI_SESSION (session));
|
||||
|
||||
action_group = ACTION_GROUP (MAIL_LABEL);
|
||||
merge_id = mail_shell_view->priv->label_merge_id;
|
||||
path = "/mail-message-popup/mail-label-menu/mail-label-actions";
|
||||
main_menu_path = "/main-menu/custom-menus/mail-message-menu/mail-mark-as-menu/mail-label-menu/mail-label-actions";
|
||||
popup_menu_path = "/mail-message-popup/mail-label-menu/mail-label-actions";
|
||||
|
||||
/* Unmerge the previous menu items. */
|
||||
gtk_ui_manager_remove_ui (ui_manager, merge_id);
|
||||
gtk_ui_manager_remove_ui (ui_manager, mail_shell_view->priv->main_menu_label_merge_id);
|
||||
gtk_ui_manager_remove_ui (ui_manager, mail_shell_view->priv->popup_menu_label_merge_id);
|
||||
e_action_group_remove_all_actions (action_group);
|
||||
gtk_ui_manager_ensure_update (ui_manager);
|
||||
|
||||
@ -2580,8 +2580,12 @@ e_mail_shell_view_update_popup_labels (EMailShellView *mail_shell_view)
|
||||
g_object_unref (label_action);
|
||||
|
||||
gtk_ui_manager_add_ui (
|
||||
ui_manager, merge_id, path, action_name,
|
||||
action_name, GTK_UI_MANAGER_AUTO, FALSE);
|
||||
ui_manager, mail_shell_view->priv->main_menu_label_merge_id, main_menu_path,
|
||||
action_name, action_name, GTK_UI_MANAGER_AUTO, FALSE);
|
||||
|
||||
gtk_ui_manager_add_ui (
|
||||
ui_manager, mail_shell_view->priv->popup_menu_label_merge_id, popup_menu_path,
|
||||
action_name, action_name, GTK_UI_MANAGER_AUTO, FALSE);
|
||||
|
||||
g_free (label);
|
||||
g_free (stock_id);
|
||||
|
||||
@ -535,7 +535,6 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
|
||||
EMailView *mail_view;
|
||||
EMailDisplay *display;
|
||||
const gchar *source;
|
||||
guint merge_id;
|
||||
gint ii = 0;
|
||||
|
||||
shell_view = E_SHELL_VIEW (mail_shell_view);
|
||||
@ -563,8 +562,8 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
|
||||
shell_window, "set-focus",
|
||||
G_CALLBACK (e_mail_shell_view_update_labels_sensitivity), shell_view);
|
||||
|
||||
merge_id = gtk_ui_manager_new_merge_id (ui_manager);
|
||||
priv->label_merge_id = merge_id;
|
||||
priv->main_menu_label_merge_id = gtk_ui_manager_new_merge_id (ui_manager);
|
||||
priv->popup_menu_label_merge_id = gtk_ui_manager_new_merge_id (ui_manager);
|
||||
|
||||
/* Cache these to avoid lots of awkward casting. */
|
||||
priv->mail_shell_backend = g_object_ref (shell_backend);
|
||||
|
||||
@ -120,7 +120,8 @@ struct _EMailShellViewPrivate {
|
||||
|
||||
/* For UI merging and unmerging. */
|
||||
guint merge_id;
|
||||
guint label_merge_id;
|
||||
guint main_menu_label_merge_id;
|
||||
guint popup_menu_label_merge_id;
|
||||
|
||||
/* Filter rules correspond to the search entry menu. */
|
||||
EFilterRule *search_rules[MAIL_NUM_SEARCH_RULES];
|
||||
|
||||
Reference in New Issue
Block a user