diff options
-rw-r--r-- | mail/em-composer-utils.c | 10 | ||||
-rw-r--r-- | mail/evolution-mail.schemas.in | 15 | ||||
-rw-r--r-- | mail/mail-config.ui | 19 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-settings.c | 4 | ||||
-rw-r--r-- | modules/mail/em-composer-prefs.c | 7 |
5 files changed, 52 insertions, 3 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index b09d3cd4e2..3f851c0991 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1413,17 +1413,23 @@ emu_update_composers_security (EMsgComposer *composer, guint32 validity_found) { GtkToggleAction *action; + EShell *shell; + EShellSettings *shell_settings; g_return_if_fail (composer != NULL); + shell = e_msg_composer_get_shell (composer); + shell_settings = e_shell_get_shell_settings (shell); + /* Pre-set only for encrypted messages, not for signed */ - /*if (validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) { + if ((validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) != 0 + && e_shell_settings_get_boolean (shell_settings, "composer-sign-reply-if-signed")) { if (validity_found & EM_FORMAT_VALIDITY_FOUND_SMIME) action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_SMIME_SIGN (composer)); else action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_PGP_SIGN (composer)); gtk_toggle_action_set_active (action, TRUE); - }*/ + } if (validity_found & EM_FORMAT_VALIDITY_FOUND_ENCRYPTED) { if (validity_found & EM_FORMAT_VALIDITY_FOUND_SMIME) diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in index c26c0feb96..f7c3844b8a 100644 --- a/mail/evolution-mail.schemas.in +++ b/mail/evolution-mail.schemas.in @@ -77,6 +77,21 @@ </schema> <schema> + <key>/schemas/apps/evolution/mail/composer/sign_reply_if_signed</key> + <applyto>/apps/evolution/mail/composer/sign_reply_if_signed</applyto> + <owner>evolution-mail</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Digitally sign messages when original message signed (PGP or S/MIME)</short> + <long> + Automatically enable PGP or S/MIME signatures when replying + to a message which is also PGP or S/MIME signed. + </long> + </locale> + </schema> + + <schema> <key>/schemas/apps/evolution/mail/composer/reply_start_bottom</key> <applyto>/apps/evolution/mail/composer/reply_start_bottom</applyto> <owner>evolution-mail</owner> diff --git a/mail/mail-config.ui b/mail/mail-config.ui index ca356814d2..0c4696b3bd 100644 --- a/mail/mail-config.ui +++ b/mail/mail-config.ui @@ -594,7 +594,7 @@ for display purposes only. </property> <object class="GtkTable" id="replies-and-forwards-table"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="n_rows">6</property> + <property name="n_rows">7</property> <property name="n_columns">2</property> <property name="column_spacing">6</property> <property name="row_spacing">6</property> @@ -697,6 +697,23 @@ for display purposes only. </property> </packing> </child> <child> + <object class="GtkCheckButton" id="chkSignReplyIfSigned"> + <property name="label" translatable="yes">Digitally _sign messages when original message signed (PGP or S/MIME)</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="y_options"></property> + </packing> + </child> + <child> <object class="GtkAlignment" id="reply-style-alignment"> <property name="visible">True</property> <property name="can_focus">False</property> diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c index b0d5f1eed8..6b0cee6826 100644 --- a/modules/mail/e-mail-shell-settings.c +++ b/modules/mail/e-mail-shell-settings.c @@ -278,6 +278,10 @@ e_mail_shell_settings_init (EShellBackend *shell_backend) "/apps/evolution/mail/composer/group_reply_to_list"); e_shell_settings_install_property_for_key ( + "composer-sign-reply-if-signed", + "/apps/evolution/mail/composer/sign_reply_if_signed"); + + e_shell_settings_install_property_for_key ( "composer-prompt-only-bcc", "/apps/evolution/mail/prompts/only_bcc"); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 8453b88540..4f4c0d15ac 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -456,6 +456,13 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "chkSignReplyIfSigned"); + g_object_bind_property ( + shell_settings, "composer-sign-reply-if-signed", + widget, "active", + G_BINDING_BIDIRECTIONAL | + G_BINDING_SYNC_CREATE); + widget = e_builder_get_widget (prefs->builder, "chkTopSignature"); g_object_bind_property ( shell_settings, "composer-top-signature", |