aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--composer/e-msg-composer.c14
-rw-r--r--mail/mail-config.ui85
2 files changed, 75 insertions, 24 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);
}
}
}
diff --git a/mail/mail-config.ui b/mail/mail-config.ui
index 577adac656..55f5ee6227 100644
--- a/mail/mail-config.ui
+++ b/mail/mail-config.ui
@@ -2035,6 +2035,68 @@ For example: "Work" or "Personal"</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
+ <object class="GtkVBox" id="general_vbox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">General</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="pgp_no_imip_sign">
+ <property name="label" translatable="yes">_Do not sign meeting requests (for Outlook compatibility)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkVBox" id="pgp_frame">
<property name="visible">True</property>
<property name="orientation">vertical</property>
@@ -2128,21 +2190,6 @@ For example: "Work" or "Personal"</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="pgp_no_imip_sign">
- <property name="label" translatable="yes">_Do not sign meeting requests (for Outlook compatibility)</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="pgp_encrypt_to_self">
<property name="label" translatable="yes">Always encrypt to _myself when sending encrypted messages</property>
<property name="visible">True</property>
@@ -2155,7 +2202,7 @@ For example: "Work" or "Personal"</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -2170,7 +2217,7 @@ For example: "Work" or "Personal"</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -2189,7 +2236,7 @@ For example: "Work" or "Personal"</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -2585,7 +2632,7 @@ For example: "Work" or "Personal"</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>