aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-12-24 02:31:47 +0800
committerMilan Crha <mcrha@redhat.com>2009-12-24 02:31:47 +0800
commit83dc7625983470bff4ce8b9070fbc23c3370c472 (patch)
treeb53ffbc8e2c94061a37aace6c006516bb2cf76c2 /composer
parent3f36489c67887491385086180147a7e4475a349d (diff)
downloadgsoc2013-evolution-83dc7625983470bff4ce8b9070fbc23c3370c472.tar.gz
gsoc2013-evolution-83dc7625983470bff4ce8b9070fbc23c3370c472.tar.zst
gsoc2013-evolution-83dc7625983470bff4ce8b9070fbc23c3370c472.zip
Bug #520816 - S/MIME shares "Do not sign meeting requests" with PGP
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 2f2bb99baa..6477936011 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1460,7 +1460,7 @@ msg_composer_account_changed_cb (EMsgComposer *composer)
GtkToggleAction *action;
ESignature *signature;
EAccount *account;
- gboolean active;
+ gboolean active, can_sign;
const gchar *uid;
table = e_msg_composer_get_header_table (composer);
@@ -1469,14 +1469,15 @@ msg_composer_account_changed_cb (EMsgComposer *composer)
if (account == NULL)
goto exit;
- action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
- active = account->pgp_always_sign &&
- (!account->pgp_no_imip_sign || p->mime_type == NULL ||
+ can_sign = (!account->pgp_no_imip_sign || p->mime_type == NULL ||
g_ascii_strncasecmp (p->mime_type, "text/calendar", 13) != 0);
+
+ action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
+ active = account->pgp_always_sign && can_sign;
gtk_toggle_action_set_active (action, active);
action = GTK_TOGGLE_ACTION (ACTION (SMIME_SIGN));
- active = account->smime_sign_default;
+ active = account->smime_sign_default && can_sign;
gtk_toggle_action_set_active (action, active);
action = GTK_TOGGLE_ACTION (ACTION (SMIME_ENCRYPT));
@@ -3370,6 +3371,9 @@ e_msg_composer_set_body (EMsgComposer *composer,
action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
gtk_toggle_action_set_active (action, FALSE);
+
+ action = GTK_TOGGLE_ACTION (ACTION (SMIME_SIGN));
+ gtk_toggle_action_set_active (action, FALSE);
}
}
}