aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-01 10:53:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-02-20 23:04:25 +0800
commit23f5773903d64a554d977ae7d0ebbaca73528f1f (patch)
tree104e1a59da8bf96b004bce204b79f47bbe0a6d13 /mail/em-composer-utils.c
parent49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff)
downloadgsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.bz2
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.lz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.xz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 3dd93c1891..23c1755687 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1454,31 +1454,40 @@ static void
emu_update_composers_security (EMsgComposer *composer,
guint32 validity_found)
{
- GtkToggleAction *action;
EShell *shell;
EShellSettings *shell_settings;
+ GtkAction *action;
+ gboolean sign_by_default;
g_return_if_fail (composer != NULL);
shell = e_msg_composer_get_shell (composer);
shell_settings = e_shell_get_shell_settings (shell);
+ sign_by_default =
+ (validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) != 0 &&
+ e_shell_settings_get_boolean (
+ shell_settings, "composer-sign-reply-if-signed");
+
/* Pre-set only for encrypted messages, not for signed */
- if ((validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) != 0
- && e_shell_settings_get_boolean (shell_settings, "composer-sign-reply-if-signed")) {
+ if (sign_by_default) {
if (validity_found & EM_FORMAT_VALIDITY_FOUND_SMIME)
- action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_SMIME_SIGN (composer));
+ 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);
+ action = E_COMPOSER_ACTION_PGP_SIGN (composer);
+
+ gtk_toggle_action_set_active (
+ GTK_TOGGLE_ACTION (action), TRUE);
}
if (validity_found & EM_FORMAT_VALIDITY_FOUND_ENCRYPTED) {
if (validity_found & EM_FORMAT_VALIDITY_FOUND_SMIME)
- action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_SMIME_ENCRYPT (composer));
+ action = E_COMPOSER_ACTION_SMIME_ENCRYPT (composer);
else
- action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_PGP_ENCRYPT (composer));
- gtk_toggle_action_set_active (action, TRUE);
+ action = E_COMPOSER_ACTION_PGP_ENCRYPT (composer);
+
+ gtk_toggle_action_set_active (
+ GTK_TOGGLE_ACTION (action), TRUE);
}
}
@@ -1775,7 +1784,8 @@ forward_got_messages_cb (CamelFolder *folder,
* @folder: folder containing messages to forward
* @uids: uids of messages to forward
* @style: the forward style to use
- * @destroy_when_done: a #GtkWidget to destroy with gtk_widget_destroy() when done; can be NULL
+ * @destroy_when_done: a #GtkWidget to destroy with gtk_widget_destroy()
+ * when done; can be NULL
*
* Forwards a group of messages in the given style.
*
@@ -2130,7 +2140,8 @@ get_reply_to (CamelMimeMessage *message)
gboolean ignore_list_reply_to;
settings = g_settings_new ("org.gnome.evolution.mail");
- ignore_list_reply_to = g_settings_get_boolean (settings, "composer-ignore-list-reply-to");
+ ignore_list_reply_to = g_settings_get_boolean (
+ settings, "composer-ignore-list-reply-to");
g_object_unref (settings);
if (ignore_list_reply_to && em_utils_is_munged_list_message (message))