talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit d6e99c00aa4fda7924b74438d45605bf50018b8c
parent bc092bdf205c876a190a3adb8cf956d1921595ec
Author: wwp <subscript@free.fr>
Date:   Thu,  4 Jan 2024 11:32:47 +0100

Fix bug 4724: set proper availability status to sign/encrypt toolbar buttons (patch by Olaf Hering).

Diffstat:
Msrc/compose.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -11544,7 +11544,8 @@ static void compose_toggle_sign_cb(GtkToggleAction *action, gpointer data) Compose *compose = (Compose *)data; compose->use_signing = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn), compose->use_signing); + if (compose->toolbar->privacy_sign_btn != NULL) + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn), compose->use_signing); } static void compose_toggle_encrypt_cb(GtkToggleAction *action, gpointer data) @@ -11552,7 +11553,8 @@ static void compose_toggle_encrypt_cb(GtkToggleAction *action, gpointer data) Compose *compose = (Compose *)data; compose->use_encryption = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_encrypt_btn), compose->use_encryption); + if (compose->toolbar->privacy_encrypt_btn != NULL) + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_encrypt_btn), compose->use_encryption); } static void compose_activate_privacy_system(Compose *compose, PrefsAccount *account, gboolean warn)