EMailReader: Correct sensitivity of toolbar buttons

The helper toolbar buttons for Group Reply and Forward had been
always sensitive, not only when they could be used.
This commit is contained in:
Milan Crha
2022-12-08 13:02:25 +01:00
parent f9a7d86419
commit 5388fa3ecd

View File

@ -5228,6 +5228,11 @@ e_mail_reader_init (EMailReader *reader,
gtk_action_set_icon_name (GTK_ACTION (menu_tool_action), "mail-forward");
gtk_action_set_visible (GTK_ACTION (menu_tool_action), !e_util_get_use_header_bar ());
e_binding_bind_property (
e_mail_reader_get_action (reader, "mail-forward"), "sensitive",
menu_tool_action, "sensitive",
G_BINDING_SYNC_CREATE);
g_signal_connect (
menu_tool_action, "activate",
G_CALLBACK (action_mail_forward_cb), reader);
@ -5268,6 +5273,11 @@ e_mail_reader_init (EMailReader *reader,
gtk_action_set_icon_name (GTK_ACTION (menu_tool_action), "mail-reply-all");
gtk_action_set_visible (GTK_ACTION (menu_tool_action), !e_util_get_use_header_bar ());
e_binding_bind_property (
e_mail_reader_get_action (reader, "mail-reply-group"), "sensitive",
menu_tool_action, "sensitive",
G_BINDING_SYNC_CREATE);
g_signal_connect (
menu_tool_action, "activate",
G_CALLBACK (action_mail_reply_group_cb), reader);