[evolution] Miscellaeous cleanups.



commit 7a6be11ea62647cba65625b2f65b944f22e65288
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Oct 20 11:15:41 2013 -0400

    Miscellaeous cleanups.

 composer/e-msg-composer.c                  |    2 +-
 e-util/e-web-view.c                        |   12 +-
 em-format/e-mail-formatter-error.c         |    2 +-
 em-format/e-mail-formatter-text-enriched.c |    2 +-
 mail/e-mail-display.c                      |   30 +-
 mail/e-mail-send-account-override.c        |  686 ++++++++++++++--------------
 mail/e-mail-send-account-override.h        |   87 ++--
 mail/em-composer-utils.c                   |   10 +-
 mail/em-folder-properties.c                |    8 +-
 mail/em-subscription-editor.c              |   20 +-
 modules/mail/em-composer-prefs.c           |  101 +++--
 shell/e-shell-taskbar.c                    |   12 +-
 12 files changed, 524 insertions(+), 448 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index cb0fcf2..9b721b0 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2892,7 +2892,7 @@ handle_multipart_alternative (EMsgComposer *composer,
                                text_part = mime_part;
 
                        /* this is when prefer-plain filters out text/html part, then
-                          the text/plain should be used */
+                        * the text/plain should be used */
                        if (camel_content_type_is (content_type, "text", "plain"))
                                fallback_text_part = mime_part;
                } else {
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index b60dce3..2f614dc 100644
--- a/e-util/e-web-view.c
+++ b/e-util/e-web-view.c
@@ -629,7 +629,7 @@ web_view_load_status_changed_cb (WebKitWebView *webkit_web_view,
        status = webkit_web_view_get_load_status (webkit_web_view);
 
        if (status != WEBKIT_LOAD_FINISHED)
-                       return;
+               return;
 
        style_updated_cb (web_view);
 
@@ -1806,11 +1806,11 @@ e_web_view_clear (EWebView *web_view)
 
        webkit_web_view_load_html_string (
                WEBKIT_WEB_VIEW (web_view),
-               "<html> \
-                <head></head> \
-                <body class=\"-e-web-view-background-color -e-web-view-text-color\"></body> \
-                </html>",
-                NULL);
+               "<html>"
+               "<head></head>"
+               "<body class=\"-e-web-view-background-color -e-web-view-text-color\"></body>"
+               "</html>",
+               NULL);
 }
 
 void
diff --git a/em-format/e-mail-formatter-error.c b/em-format/e-mail-formatter-error.c
index f349283..a0a789f 100644
--- a/em-format/e-mail-formatter-error.c
+++ b/em-format/e-mail-formatter-error.c
@@ -60,7 +60,7 @@ emfe_error_format (EMailFormatterExtension *extension,
 
        html = g_strdup_printf (
                "<div class=\"part-container -e-mail-formatter-frame-color "
-               "-e-mail-formatter-body-color -e-web-view-text-color\">"
+               "-e-mail-formatter-body-color -e-web-view-text-color\">"
                "<div class=\"part-container-inner-margin pre\">\n"
                "<table border=\"0\" cellspacing=\"10\" "
                "cellpadding=\"0\" width=\"100%%\">\n"
diff --git a/em-format/e-mail-formatter-text-enriched.c b/em-format/e-mail-formatter-text-enriched.c
index 168522e..a94d226 100644
--- a/em-format/e-mail-formatter-text-enriched.c
+++ b/em-format/e-mail-formatter-text-enriched.c
@@ -76,7 +76,7 @@ emfe_text_enriched_format (EMailFormatterExtension *extension,
        g_string_append (
                buffer,
                "<div class=\"part-container -e-mail-formatter-frame-color "
-               "-e-web-view-background-color -e-web-view-text-color\">"
+               "-e-web-view-background-color -e-web-view-text-color\">"
                "<div class=\"part-container-inner-margin\">\n");
 
        camel_stream_write_string (stream, buffer->str, cancellable, NULL);
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index d4a0277..624e640 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -825,20 +825,24 @@ toggle_address_visibility (WebKitDOMElement *button,
 
 static void
 add_color_css_rule_for_web_view (EWebView *view,
-                                const char *color_name,
-                                const char *color_value)
+                                 const gchar *color_name,
+                                 const gchar *color_value)
 {
        gchar *selector;
        gchar *style;
 
        selector = g_strconcat (".-e-mail-formatter-", color_name, NULL);
 
-       if (g_strstr_len (color_name, -1, "header"))
-               style = g_strconcat ("color: ", color_value, " !important;", NULL);
-       else if (g_strstr_len (color_name, -1, "frame"))
-               style = g_strconcat ("border-color: ", color_value, " !important;", NULL);
-       else
-               style = g_strconcat ("background-color: ", color_value, " !important;", NULL);
+       if (g_strstr_len (color_name, -1, "header")) {
+               style = g_strconcat (
+                       "color: ", color_value, " !important;", NULL);
+       } else if (g_strstr_len (color_name, -1, "frame")) {
+               style = g_strconcat (
+                       "border-color: ", color_value, " !important;", NULL);
+       } else {
+               style = g_strconcat (
+                       "background-color: ", color_value, " !important;", NULL);
+       }
 
        e_web_view_add_css_rule_into_style_sheet (
                view,
@@ -854,10 +858,16 @@ static void
 initialize_web_view_colors (EMailDisplay *display)
 {
        EMailFormatter *formatter;
-       const gchar *color_names [] = { "body-color", "citation-color",
-                                       "frame-color", "header-color", NULL };
        gint ii;
 
+       const gchar *color_names[] = {
+               "body-color",
+               "citation-color",
+               "frame-color",
+               "header-color",
+               NULL
+       };
+
        formatter = e_mail_display_get_formatter (display);
 
        for (ii = 0; color_names[ii]; ii++) {
diff --git a/mail/e-mail-send-account-override.c b/mail/e-mail-send-account-override.c
index 8af7227..8f55d2b 100644
--- a/mail/e-mail-send-account-override.c
+++ b/mail/e-mail-send-account-override.c
@@ -19,15 +19,16 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "e-mail-send-account-override.h"
 
+#include <config.h>
 #include <string.h>
 
 #include <libedataserver/libedataserver.h>
 
-#include "e-mail-send-account-override.h"
+#define E_MAIL_SEND_ACCOUNT_OVERRIDE_GET_PRIVATE(obj) \
+       (G_TYPE_INSTANCE_GET_PRIVATE \
+       ((obj), E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, EMailSendAccountOverridePrivate))
 
 #define FOLDERS_SECTION                "Folders"
 #define RECIPIENTS_SECTION     "Recipients"
@@ -35,8 +36,7 @@
 
 #define OPTION_PREFER_FOLDER   "PreferFolder"
 
-struct _EMailSendAccountOverridePrivate
-{
+struct _EMailSendAccountOverridePrivate {
        GKeyFile *key_file;
        gchar *config_filename;
        gboolean prefer_folder;
@@ -57,142 +57,34 @@ enum {
        LAST_SIGNAL
 };
 
-static gint signals[LAST_SIGNAL];
-
-G_DEFINE_TYPE (EMailSendAccountOverride, e_mail_send_account_override, G_TYPE_OBJECT)
-
-static void
-e_mail_send_account_override_get_property (GObject *object,
-                                          guint property_id,
-                                          GValue *value,
-                                          GParamSpec *pspec)
-{
-       EMailSendAccountOverride *account_override = E_MAIL_SEND_ACCOUNT_OVERRIDE (object);
-
-       g_return_if_fail (account_override != NULL);
-
-       switch (property_id) {
-               case PROP_PREFER_FOLDER:
-                       g_value_set_boolean (value,
-                               e_mail_send_account_override_get_prefer_folder (account_override));
-                       break;
-
-               default:
-                       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-                       break;
-       }
-}
-
-static void
-e_mail_send_account_override_set_property (GObject *object,
-                                          guint property_id,
-                                          const GValue *value,
-                                          GParamSpec *pspec)
-{
-       EMailSendAccountOverride *account_override = E_MAIL_SEND_ACCOUNT_OVERRIDE (object);
-
-       g_return_if_fail (account_override != NULL);
+static guint signals[LAST_SIGNAL];
 
-       switch (property_id) {
-               case PROP_PREFER_FOLDER:
-                       e_mail_send_account_override_set_prefer_folder (account_override,
-                               g_value_get_boolean (value));
-                       break;
-
-               default:
-                       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-                       break;
-       }
-}
-
-static void
-e_mail_send_account_override_finalize (GObject *object)
-{
-       EMailSendAccountOverride *account_override = E_MAIL_SEND_ACCOUNT_OVERRIDE (object);
-
-       g_return_if_fail (account_override != NULL);
-
-       if (account_override->priv->key_file) {
-               g_key_file_free (account_override->priv->key_file);
-               account_override->priv->key_file = NULL;
-       }
-
-       if (account_override->priv->config_filename) {
-               g_free (account_override->priv->config_filename);
-               account_override->priv->config_filename = NULL;
-       }
-
-       g_mutex_clear (&account_override->priv->property_lock);
-
-       G_OBJECT_CLASS (e_mail_send_account_override_parent_class)->finalize (object);
-}
-
-static void
-e_mail_send_account_override_class_init (EMailSendAccountOverrideClass *klass)
-{
-       GObjectClass *object_class;
-
-       g_type_class_add_private (klass, sizeof (EMailSendAccountOverridePrivate));
-
-       object_class = G_OBJECT_CLASS (klass);
-       object_class->get_property = e_mail_send_account_override_get_property;
-       object_class->set_property = e_mail_send_account_override_set_property;
-       object_class->finalize = e_mail_send_account_override_finalize;
-
-       g_object_class_install_property (
-               object_class,
-               PROP_PREFER_FOLDER,
-               g_param_spec_boolean (
-                       "prefer-folder",
-                       "Prefer Folder",
-                       NULL,
-                       TRUE,
-                       G_PARAM_READWRITE));
-
-       signals[CHANGED] = g_signal_new (
-               "changed",
-               G_OBJECT_CLASS_TYPE (object_class),
-               G_SIGNAL_RUN_FIRST,
-               G_STRUCT_OFFSET (EMailSendAccountOverrideClass, changed),
-               NULL, NULL,
-               g_cclosure_marshal_VOID__VOID,
-               G_TYPE_NONE, 0);
-}
-
-static void
-e_mail_send_account_override_init (EMailSendAccountOverride *account_override)
-{
-       account_override->priv = G_TYPE_INSTANCE_GET_PRIVATE (account_override,
-               E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, EMailSendAccountOverridePrivate);
-
-       g_mutex_init (&account_override->priv->property_lock);
-       account_override->priv->key_file = g_key_file_new ();
-       account_override->priv->config_filename = NULL;
-       account_override->priv->prefer_folder = TRUE;
-       account_override->priv->need_save = FALSE;
-       account_override->priv->save_frozen = 0;
-}
+G_DEFINE_TYPE (
+       EMailSendAccountOverride,
+       e_mail_send_account_override,
+       G_TYPE_OBJECT)
 
 static gboolean
-e_mail_send_account_override_save_locked (EMailSendAccountOverride *account_override)
+e_mail_send_account_override_save_locked (EMailSendAccountOverride *override)
 {
        gchar *contents;
        GError *error = NULL;
 
-       g_return_val_if_fail (account_override->priv->key_file != NULL, FALSE);
+       g_return_val_if_fail (override->priv->key_file != NULL, FALSE);
 
-       account_override->priv->need_save = FALSE;
+       override->priv->need_save = FALSE;
 
-       if (!account_override->priv->config_filename)
+       if (override->priv->config_filename == NULL)
                return FALSE;
 
-       contents = g_key_file_to_data (account_override->priv->key_file, NULL, NULL);
-       if (!contents)
+       contents = g_key_file_to_data (override->priv->key_file, NULL, NULL);
+       if (contents == NULL)
                return FALSE;
 
-       g_file_set_contents (account_override->priv->config_filename, contents, -1, &error);
+       g_file_set_contents (
+               override->priv->config_filename, contents, -1, &error);
 
-       if (error) {
+       if (error != NULL) {
                g_warning ("%s: %s", G_STRFUNC, error->message);
                g_clear_error (&error);
        }
@@ -203,31 +95,32 @@ e_mail_send_account_override_save_locked (EMailSendAccountOverride *account_over
 }
 
 static gboolean
-e_mail_send_account_override_maybe_save_locked (EMailSendAccountOverride *account_override)
+e_mail_send_account_override_maybe_save_locked (EMailSendAccountOverride *override)
 {
-       if (account_override->priv->save_frozen)
-               account_override->priv->need_save = TRUE;
-       else
-               return e_mail_send_account_override_save_locked (account_override);
+       if (override->priv->save_frozen > 0) {
+               override->priv->need_save = TRUE;
+               return FALSE;
+       }
 
-       return FALSE;
+       return e_mail_send_account_override_save_locked (override);
 }
 
 static gchar *
-get_override_for_folder_uri_locked (EMailSendAccountOverride *account_override,
-                                   const gchar *folder_uri)
+get_override_for_folder_uri_locked (EMailSendAccountOverride *override,
+                                    const gchar *folder_uri)
 {
        gchar *account_uid;
 
-       if (!folder_uri || !*folder_uri)
+       if (folder_uri == NULL || *folder_uri == '\0')
                return NULL;
 
-       account_uid = g_key_file_get_string (account_override->priv->key_file, FOLDERS_SECTION, folder_uri, 
NULL);
+       account_uid = g_key_file_get_string (
+               override->priv->key_file, FOLDERS_SECTION, folder_uri, NULL);
 
-       if (account_uid)
+       if (account_uid != NULL)
                g_strchomp (account_uid);
 
-       if (account_uid && !*account_uid) {
+       if (account_uid != NULL && *account_uid == '\0') {
                g_free (account_uid);
                account_uid = NULL;
        }
@@ -236,25 +129,31 @@ get_override_for_folder_uri_locked (EMailSendAccountOverride *account_override,
 }
 
 static gchar *
-test_one_recipient (/* const */ gchar **keys,
-                   /* const */ GPtrArray *values,
-                   const gchar *name,
-                   const gchar *address)
+test_one_recipient (gchar **keys,
+                    GPtrArray *values,
+                    const gchar *name,
+                    const gchar *address)
 {
        gint ii;
 
        g_return_val_if_fail (keys != NULL, NULL);
        g_return_val_if_fail (values != NULL, NULL);
 
-       if ((!name || !*name) && (!address || !*address))
+       if (name != NULL && *name == '\0')
+               name = NULL;
+
+       if (address != NULL && *address == '\0')
+               address = NULL;
+
+       if (name == NULL && address == NULL)
                return NULL;
 
        for (ii = 0; keys[ii] && ii < values->len; ii++) {
-               if (name && *name && e_util_utf8_strstrcase (name, keys[ii]) != NULL) {
+               if (name != NULL && e_util_utf8_strstrcase (name, keys[ii]) != NULL) {
                        return g_strdup (values->pdata[ii]);
                }
 
-               if (address && *address && e_util_utf8_strstrcase (address, keys[ii]) != NULL) {
+               if (address != NULL && e_util_utf8_strstrcase (address, keys[ii]) != NULL) {
                        return g_strdup (values->pdata[ii]);
                }
        }
@@ -263,8 +162,8 @@ test_one_recipient (/* const */ gchar **keys,
 }
 
 static gchar *
-get_override_for_recipients_locked (EMailSendAccountOverride *account_override,
-                                   CamelAddress *recipients)
+get_override_for_recipients_locked (EMailSendAccountOverride *override,
+                                    CamelAddress *recipients)
 {
        CamelInternetAddress *iaddress;
        gchar *account_uid = NULL;
@@ -272,17 +171,21 @@ get_override_for_recipients_locked (EMailSendAccountOverride *account_override,
        gchar **keys;
        gint ii, len;
 
-       if (!recipients || !CAMEL_IS_INTERNET_ADDRESS (recipients))
+       if (!CAMEL_IS_INTERNET_ADDRESS (recipients))
                return NULL;
 
-       keys = g_key_file_get_keys (account_override->priv->key_file, RECIPIENTS_SECTION, NULL, NULL);
-       if (!keys)
+       keys = g_key_file_get_keys (
+               override->priv->key_file, RECIPIENTS_SECTION, NULL, NULL);
+       if (keys == NULL)
                return NULL;
 
        values = g_ptr_array_new_full (g_strv_length (keys), g_free);
        for (ii = 0; keys[ii]; ii++) {
-               g_ptr_array_add (values, g_key_file_get_string (account_override->priv->key_file,
-                       RECIPIENTS_SECTION, keys[ii], NULL));
+               g_ptr_array_add (
+                       values,
+                       g_key_file_get_string (
+                               override->priv->key_file,
+                               RECIPIENTS_SECTION, keys[ii], NULL));
        }
 
        iaddress = CAMEL_INTERNET_ADDRESS (recipients);
@@ -293,15 +196,15 @@ get_override_for_recipients_locked (EMailSendAccountOverride *account_override,
                if (camel_internet_address_get (iaddress, ii, &name, &address)) {
                        account_uid = test_one_recipient (keys, values, name, address);
 
-                       if (account_uid)
+                       if (account_uid != NULL)
                                g_strchomp (account_uid);
 
-                       if (account_uid && !*account_uid) {
+                       if (account_uid != NULL && *account_uid == '\0') {
                                g_free (account_uid);
                                account_uid = NULL;
                        }
 
-                       if (account_uid)
+                       if (account_uid != NULL)
                                break;
                }
        }
@@ -313,406 +216,527 @@ get_override_for_recipients_locked (EMailSendAccountOverride *account_override,
 }
 
 static void
-list_overrides_section_for_account_locked (EMailSendAccountOverride *account_override,
-                                          const gchar *account_uid,
-                                          const gchar *section,
-                                          GSList **overrides)
+list_overrides_section_for_account_locked (EMailSendAccountOverride *override,
+                                           const gchar *account_uid,
+                                           const gchar *section,
+                                           GList **overrides)
 {
        gchar **keys;
 
        g_return_if_fail (account_uid != NULL);
        g_return_if_fail (section != NULL);
 
-       if (!overrides)
+       if (overrides == NULL)
                return;
 
        *overrides = NULL;
 
-       keys = g_key_file_get_keys (account_override->priv->key_file, section, NULL, NULL);
-       if (keys) {
+       keys = g_key_file_get_keys (
+               override->priv->key_file, section, NULL, NULL);
+       if (keys != NULL) {
                gint ii;
 
                for (ii = 0; keys[ii]; ii++) {
                        const gchar *key = keys[ii];
                        gchar *value;
 
-                       value = g_key_file_get_string (account_override->priv->key_file, section, key, NULL);
+                       value = g_key_file_get_string (
+                               override->priv->key_file, section, key, NULL);
                        if (g_strcmp0 (value, account_uid) == 0)
-                               *overrides = g_slist_prepend (*overrides, g_strdup (key));
+                               *overrides = g_list_prepend (*overrides, g_strdup (key));
                        g_free (value);
                }
        }
 
        g_strfreev (keys);
 
-       *overrides = g_slist_reverse (*overrides);
+       *overrides = g_list_reverse (*overrides);
 }
 
 static void
-list_overrides_for_account_locked (EMailSendAccountOverride *account_override,
-                                  const gchar *account_uid,
-                                  GSList **folder_overrides,
-                                  GSList **recipient_overrides)
+list_overrides_for_account_locked (EMailSendAccountOverride *override,
+                                   const gchar *account_uid,
+                                   GList **folder_overrides,
+                                   GList **recipient_overrides)
 {
-       if (!account_uid)
+       if (account_uid == NULL)
                return;
 
-       list_overrides_section_for_account_locked (account_override, account_uid, FOLDERS_SECTION, 
folder_overrides);
-       list_overrides_section_for_account_locked (account_override, account_uid, RECIPIENTS_SECTION, 
recipient_overrides);
+       list_overrides_section_for_account_locked (
+               override, account_uid, FOLDERS_SECTION, folder_overrides);
+       list_overrides_section_for_account_locked (
+               override, account_uid, RECIPIENTS_SECTION, recipient_overrides);
+}
+
+static void
+mail_send_account_override_set_property (GObject *object,
+                                         guint property_id,
+                                         const GValue *value,
+                                         GParamSpec *pspec)
+{
+       switch (property_id) {
+               case PROP_PREFER_FOLDER:
+                       e_mail_send_account_override_set_prefer_folder (
+                               E_MAIL_SEND_ACCOUNT_OVERRIDE (object),
+                               g_value_get_boolean (value));
+                       return;
+       }
+
+       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+mail_send_account_override_get_property (GObject *object,
+                                         guint property_id,
+                                         GValue *value,
+                                         GParamSpec *pspec)
+{
+       switch (property_id) {
+               case PROP_PREFER_FOLDER:
+                       g_value_set_boolean (
+                               value,
+                               e_mail_send_account_override_get_prefer_folder (
+                               E_MAIL_SEND_ACCOUNT_OVERRIDE (object)));
+                       return;
+       }
+
+       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+mail_send_account_override_finalize (GObject *object)
+{
+       EMailSendAccountOverridePrivate *priv;
+
+       priv = E_MAIL_SEND_ACCOUNT_OVERRIDE_GET_PRIVATE (object);
+
+       g_key_file_free (priv->key_file);
+       g_free (priv->config_filename);
+
+       g_mutex_clear (&priv->property_lock);
+
+       /* Chain up to parent's finalize() method. */
+       G_OBJECT_CLASS (e_mail_send_account_override_parent_class)->
+               finalize (object);
+}
+
+static void
+e_mail_send_account_override_class_init (EMailSendAccountOverrideClass *class)
+{
+       GObjectClass *object_class;
+
+       g_type_class_add_private (
+               class, sizeof (EMailSendAccountOverridePrivate));
+
+       object_class = G_OBJECT_CLASS (class);
+       object_class->set_property = mail_send_account_override_set_property;
+       object_class->get_property = mail_send_account_override_get_property;
+       object_class->finalize = mail_send_account_override_finalize;
+
+       g_object_class_install_property (
+               object_class,
+               PROP_PREFER_FOLDER,
+               g_param_spec_boolean (
+                       "prefer-folder",
+                       "Prefer Folder",
+                       NULL,
+                       TRUE,
+                       G_PARAM_READWRITE));
+
+       signals[CHANGED] = g_signal_new (
+               "changed",
+               G_OBJECT_CLASS_TYPE (object_class),
+               G_SIGNAL_RUN_FIRST,
+               G_STRUCT_OFFSET (EMailSendAccountOverrideClass, changed),
+               NULL, NULL, NULL,
+               G_TYPE_NONE, 0);
+}
+
+static void
+e_mail_send_account_override_init (EMailSendAccountOverride *override)
+{
+       override->priv = E_MAIL_SEND_ACCOUNT_OVERRIDE_GET_PRIVATE (override);
+
+       g_mutex_init (&override->priv->property_lock);
+       override->priv->key_file = g_key_file_new ();
+       override->priv->prefer_folder = TRUE;
 }
 
 EMailSendAccountOverride *
 e_mail_send_account_override_new (const gchar *config_filename)
 {
-       EMailSendAccountOverride *account_override;
+       EMailSendAccountOverride *override;
 
-       account_override = g_object_new (E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, NULL);
+       override = g_object_new (E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, NULL);
 
-       if (config_filename)
-               e_mail_send_account_override_set_config_filename (account_override, config_filename);
+       if (config_filename != NULL)
+               e_mail_send_account_override_set_config_filename (
+                       override, config_filename);
 
-       return account_override;
+       return override;
 }
 
 void
-e_mail_send_account_override_set_config_filename (EMailSendAccountOverride *account_override,
-                                                 const gchar *config_filename)
+e_mail_send_account_override_set_config_filename (EMailSendAccountOverride *override,
+                                                  const gchar *config_filename)
 {
        GError *error = NULL;
        gboolean old_prefer_folder, prefer_folder_changed;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (config_filename != NULL);
-       g_return_if_fail (*config_filename);
+       g_return_if_fail (*config_filename != '\0');
 
-       g_mutex_lock (&account_override->priv->property_lock);
-       if (g_strcmp0 (config_filename, account_override->priv->config_filename) == 0) {
-               g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
+
+       if (g_strcmp0 (config_filename, override->priv->config_filename) == 0) {
+               g_mutex_unlock (&override->priv->property_lock);
                return;
        }
 
-       g_free (account_override->priv->config_filename);
-       account_override->priv->config_filename = g_strdup (config_filename);
+       g_free (override->priv->config_filename);
+       override->priv->config_filename = g_strdup (config_filename);
 
-       g_key_file_load_from_file (account_override->priv->key_file,
-               account_override->priv->config_filename, G_KEY_FILE_NONE, NULL);
+       g_key_file_load_from_file (
+               override->priv->key_file,
+               override->priv->config_filename, G_KEY_FILE_NONE, NULL);
 
-       old_prefer_folder = account_override->priv->prefer_folder;
-       account_override->priv->prefer_folder = g_key_file_get_boolean (account_override->priv->key_file,
+       old_prefer_folder = override->priv->prefer_folder;
+       override->priv->prefer_folder = g_key_file_get_boolean (
+               override->priv->key_file,
                OPTIONS_SECTION, OPTION_PREFER_FOLDER, &error);
 
-       if (error) {
+       if (error != NULL) {
                /* default value is to prefer the folder override over the recipients */
-               account_override->priv->prefer_folder = TRUE;
+               override->priv->prefer_folder = TRUE;
                g_clear_error (&error);
        }
 
-       prefer_folder_changed = (account_override->priv->prefer_folder ? 1 : 0) != (old_prefer_folder ? 1 : 
0);
+       prefer_folder_changed =
+               (override->priv->prefer_folder != old_prefer_folder);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (prefer_folder_changed)
-               g_object_notify (G_OBJECT (account_override), "prefer-folder");
+               g_object_notify (G_OBJECT (override), "prefer-folder");
 }
 
 gchar *
-e_mail_send_account_override_dup_config_filename (EMailSendAccountOverride *account_override)
+e_mail_send_account_override_dup_config_filename (EMailSendAccountOverride *override)
 {
        gchar *config_filename;
 
-       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override), NULL);
+       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override), NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
-       config_filename = g_strdup (account_override->priv->config_filename);
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
+       config_filename = g_strdup (override->priv->config_filename);
+       g_mutex_unlock (&override->priv->property_lock);
 
        return config_filename;
 }
 
 void
-e_mail_send_account_override_set_prefer_folder (EMailSendAccountOverride *account_override,
-                                               gboolean prefer_folder)
+e_mail_send_account_override_set_prefer_folder (EMailSendAccountOverride *override,
+                                                gboolean prefer_folder)
 {
        gboolean changed, saved = FALSE;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
+
+       g_mutex_lock (&override->priv->property_lock);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       changed = (prefer_folder != override->priv->prefer_folder);
 
-       changed = (account_override->priv->prefer_folder ? 1 : 0) != (prefer_folder ? 1 : 0);
        if (changed) {
-               account_override->priv->prefer_folder = prefer_folder;
+               override->priv->prefer_folder = prefer_folder;
 
-               g_key_file_set_boolean (account_override->priv->key_file,
+               g_key_file_set_boolean (
+                       override->priv->key_file,
                        OPTIONS_SECTION, OPTION_PREFER_FOLDER, prefer_folder);
 
-               saved = e_mail_send_account_override_maybe_save_locked (account_override);
+               saved = e_mail_send_account_override_maybe_save_locked (override);
        }
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (changed)
-               g_object_notify (G_OBJECT (account_override), "prefer-folder");
+               g_object_notify (G_OBJECT (override), "prefer-folder");
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
 
 gboolean
-e_mail_send_account_override_get_prefer_folder (EMailSendAccountOverride *account_override)
+e_mail_send_account_override_get_prefer_folder (EMailSendAccountOverride *override)
 {
-       gboolean prefer_folder;
-
-       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override), FALSE);
+       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override), FALSE);
 
-       g_mutex_lock (&account_override->priv->property_lock);
-       prefer_folder = account_override->priv->prefer_folder;
-       g_mutex_unlock (&account_override->priv->property_lock);
-
-       return prefer_folder;
+       return override->priv->prefer_folder;
 }
 
 /* free returned pointer with g_free() */
 gchar *
-e_mail_send_account_override_get_account_uid (EMailSendAccountOverride *account_override,
-                                             const gchar *folder_uri,
-                                             const CamelInternetAddress *recipients_to,
-                                             const CamelInternetAddress *recipients_cc,
-                                             const CamelInternetAddress *recipients_bcc)
+e_mail_send_account_override_get_account_uid (EMailSendAccountOverride *override,
+                                              const gchar *folder_uri,
+                                              CamelInternetAddress *recipients_to,
+                                              CamelInternetAddress *recipients_cc,
+                                              CamelInternetAddress *recipients_bcc)
 {
        gchar *account_uid = NULL;
 
-       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override), NULL);
-       g_return_val_if_fail (account_override->priv->config_filename != NULL, NULL);
+       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override), NULL);
+       g_return_val_if_fail (override->priv->config_filename != NULL, NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       if (account_override->priv->prefer_folder)
-               account_uid = get_override_for_folder_uri_locked (account_override, folder_uri);
+       if (override->priv->prefer_folder)
+               account_uid = get_override_for_folder_uri_locked (
+                       override, folder_uri);
 
-       if (!account_uid)
-               account_uid = get_override_for_recipients_locked (account_override, (CamelAddress *) 
recipients_to);
+       if (account_uid == NULL)
+               account_uid = get_override_for_recipients_locked (
+                       override, CAMEL_ADDRESS (recipients_to));
 
-       if (!account_uid)
-               account_uid = get_override_for_recipients_locked (account_override, (CamelAddress *) 
recipients_cc);
+       if (account_uid == NULL)
+               account_uid = get_override_for_recipients_locked (
+                       override, CAMEL_ADDRESS (recipients_cc));
 
-       if (!account_uid)
-               account_uid = get_override_for_recipients_locked (account_override, (CamelAddress *) 
recipients_bcc);
+       if (account_uid == NULL)
+               account_uid = get_override_for_recipients_locked (
+                       override, CAMEL_ADDRESS (recipients_bcc));
 
-       if (!account_uid && !account_override->priv->prefer_folder)
-               account_uid = get_override_for_folder_uri_locked (account_override, folder_uri);
+       if (account_uid == NULL && !override->priv->prefer_folder)
+               account_uid = get_override_for_folder_uri_locked (
+                       override, folder_uri);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        return account_uid;
 }
 
 void
-e_mail_send_account_override_remove_for_account_uid (EMailSendAccountOverride *account_override,
-                                                    const gchar *account_uid)
+e_mail_send_account_override_remove_for_account_uid (EMailSendAccountOverride *override,
+                                                     const gchar *account_uid)
 {
-       GSList *folders = NULL, *recipients = NULL, *iter;
+       GList *folders = NULL, *recipients = NULL;
        gboolean saved = FALSE;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (account_uid != NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
-       
-       list_overrides_for_account_locked (account_override, account_uid, &folders, &recipients);
+       g_mutex_lock (&override->priv->property_lock);
+
+       list_overrides_for_account_locked (
+               override, account_uid, &folders, &recipients);
 
-       if (folders || recipients) {
-               for (iter = folders; iter; iter = g_slist_next (iter)) {
-                       const gchar *key = iter->data;
+       if (folders != NULL || recipients != NULL) {
+               GList *link;
 
-                       g_key_file_remove_key (account_override->priv->key_file, FOLDERS_SECTION, key, NULL);
+               for (link = folders; link != NULL; link = g_list_next (link)) {
+                       const gchar *key = link->data;
+
+                       g_key_file_remove_key (
+                               override->priv->key_file,
+                               FOLDERS_SECTION, key, NULL);
                }
 
-               for (iter = recipients; iter; iter = g_slist_next (iter)) {
-                       const gchar *key = iter->data;
+               for (link = recipients; link != NULL; link = g_list_next (link)) {
+                       const gchar *key = link->data;
 
-                       g_key_file_remove_key (account_override->priv->key_file, RECIPIENTS_SECTION, key, 
NULL);
+                       g_key_file_remove_key (
+                               override->priv->key_file,
+                               RECIPIENTS_SECTION, key, NULL);
                }
 
-               saved = e_mail_send_account_override_maybe_save_locked (account_override);
+               saved = e_mail_send_account_override_maybe_save_locked (override);
        }
 
-       g_slist_free_full (folders, g_free);
-       g_slist_free_full (recipients, g_free);
+       g_list_free_full (folders, g_free);
+       g_list_free_full (recipients, g_free);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
 
 gchar *
-e_mail_send_account_override_get_for_folder (EMailSendAccountOverride *account_override,
-                                            const gchar *folder_uri)
+e_mail_send_account_override_get_for_folder (EMailSendAccountOverride *override,
+                                             const gchar *folder_uri)
 {
        gchar *account_uid = NULL;
 
-       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override), NULL);
+       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override), NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       account_uid = get_override_for_folder_uri_locked (account_override, folder_uri);
+       account_uid = get_override_for_folder_uri_locked (override, folder_uri);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        return account_uid;
 }
 
 void
-e_mail_send_account_override_set_for_folder (EMailSendAccountOverride *account_override,
-                                            const gchar *folder_uri,
-                                            const gchar *account_uid)
+e_mail_send_account_override_set_for_folder (EMailSendAccountOverride *override,
+                                             const gchar *folder_uri,
+                                             const gchar *account_uid)
 {
        gboolean saved;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (folder_uri != NULL);
        g_return_if_fail (account_uid != NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       g_key_file_set_string (account_override->priv->key_file, FOLDERS_SECTION, folder_uri, account_uid);
-       saved = e_mail_send_account_override_maybe_save_locked (account_override);
+       g_key_file_set_string (
+               override->priv->key_file,
+               FOLDERS_SECTION, folder_uri, account_uid);
+       saved = e_mail_send_account_override_maybe_save_locked (override);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
 
 void
-e_mail_send_account_override_remove_for_folder (EMailSendAccountOverride *account_override,
-                                               const gchar *folder_uri)
+e_mail_send_account_override_remove_for_folder (EMailSendAccountOverride *override,
+                                                const gchar *folder_uri)
 {
        gboolean saved;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (folder_uri != NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       g_key_file_remove_key (account_override->priv->key_file, FOLDERS_SECTION, folder_uri, NULL);
-       saved = e_mail_send_account_override_maybe_save_locked (account_override);
+       g_key_file_remove_key (
+               override->priv->key_file, FOLDERS_SECTION, folder_uri, NULL);
+       saved = e_mail_send_account_override_maybe_save_locked (override);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
 
 gchar *
-e_mail_send_account_override_get_for_recipient (EMailSendAccountOverride *account_override,
-                                               const CamelInternetAddress *recipients)
+e_mail_send_account_override_get_for_recipient (EMailSendAccountOverride *override,
+                                                CamelInternetAddress *recipients)
 {
        gchar *account_uid;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
-       g_return_if_fail (recipients != NULL);
+       g_return_val_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override), NULL);
+       g_return_val_if_fail (recipients != NULL, NULL);
+
+       g_mutex_lock (&override->priv->property_lock);
 
-       g_mutex_lock (&account_override->priv->property_lock);
-       account_uid = get_override_for_recipients_locked (account_override, (CamelAddress *) recipients);
-       g_mutex_unlock (&account_override->priv->property_lock);
+       account_uid = get_override_for_recipients_locked (
+               override, CAMEL_ADDRESS (recipients));
+
+       g_mutex_unlock (&override->priv->property_lock);
 
        return account_uid;
 }
 
 void
-e_mail_send_account_override_set_for_recipient (EMailSendAccountOverride *account_override,
-                                               const gchar *recipient,
-                                               const gchar *account_uid)
+e_mail_send_account_override_set_for_recipient (EMailSendAccountOverride *override,
+                                                const gchar *recipient,
+                                                const gchar *account_uid)
 {
        gboolean saved;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (recipient != NULL);
        g_return_if_fail (account_uid != NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       g_key_file_set_string (account_override->priv->key_file, RECIPIENTS_SECTION, recipient, account_uid);
-       saved = e_mail_send_account_override_maybe_save_locked (account_override);
+       g_key_file_set_string (
+               override->priv->key_file,
+               RECIPIENTS_SECTION, recipient, account_uid);
+       saved = e_mail_send_account_override_maybe_save_locked (override);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
 
 void
-e_mail_send_account_override_remove_for_recipient (EMailSendAccountOverride *account_override,
-                                                  const gchar *recipient)
+e_mail_send_account_override_remove_for_recipient (EMailSendAccountOverride *override,
+                                                   const gchar *recipient)
 {
        gboolean saved;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (recipient != NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       g_key_file_remove_key (account_override->priv->key_file, RECIPIENTS_SECTION, recipient, NULL);
-       saved = e_mail_send_account_override_maybe_save_locked (account_override);
+       g_key_file_remove_key (
+               override->priv->key_file, RECIPIENTS_SECTION, recipient, NULL);
+       saved = e_mail_send_account_override_maybe_save_locked (override);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
 
 void
-e_mail_send_account_override_list_for_account (EMailSendAccountOverride *account_override,
-                                              const gchar *account_uid,
-                                              GSList **folder_overrides,
-                                              GSList **recipient_overrides)
+e_mail_send_account_override_list_for_account (EMailSendAccountOverride *override,
+                                               const gchar *account_uid,
+                                               GList **folder_overrides,
+                                               GList **recipient_overrides)
 {
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
        g_return_if_fail (account_uid != NULL);
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       list_overrides_for_account_locked (account_override, account_uid, folder_overrides, 
recipient_overrides);
+       list_overrides_for_account_locked (
+               override, account_uid, folder_overrides, recipient_overrides);
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 }
 
 void
-e_mail_send_account_override_freeze_save (EMailSendAccountOverride *account_override)
+e_mail_send_account_override_freeze_save (EMailSendAccountOverride *override)
 {
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       account_override->priv->save_frozen++;
-       if (!account_override->priv->save_frozen) {
+       override->priv->save_frozen++;
+       if (!override->priv->save_frozen) {
                g_warn_if_reached ();
        }
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 }
 
 void
-e_mail_send_account_override_thaw_save (EMailSendAccountOverride *account_override)
+e_mail_send_account_override_thaw_save (EMailSendAccountOverride *override)
 {
        gboolean saved = FALSE;
 
-       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (account_override));
+       g_return_if_fail (E_IS_MAIL_SEND_ACCOUNT_OVERRIDE (override));
 
-       g_mutex_lock (&account_override->priv->property_lock);
+       g_mutex_lock (&override->priv->property_lock);
 
-       if (!account_override->priv->save_frozen) {
+       if (!override->priv->save_frozen) {
                g_warn_if_reached ();
        } else {
-               account_override->priv->save_frozen--;
-               if (!account_override->priv->save_frozen &&
-                   account_override->priv->need_save)
-                       saved = e_mail_send_account_override_save_locked (account_override);
+               override->priv->save_frozen--;
+               if (!override->priv->save_frozen && override->priv->need_save)
+                       saved = e_mail_send_account_override_save_locked (override);
        }
 
-       g_mutex_unlock (&account_override->priv->property_lock);
+       g_mutex_unlock (&override->priv->property_lock);
 
        if (saved)
-               g_signal_emit (account_override, signals[CHANGED], 0);
+               g_signal_emit (override, signals[CHANGED], 0);
 }
+
diff --git a/mail/e-mail-send-account-override.h b/mail/e-mail-send-account-override.h
index e89d7b6..1641bbf 100644
--- a/mail/e-mail-send-account-override.h
+++ b/mail/e-mail-send-account-override.h
@@ -56,52 +56,65 @@ struct _EMailSendAccountOverride {
 };
 
 struct _EMailSendAccountOverrideClass {
-       GObjectClass parent;
+       GObjectClass parent_class;
 
        /* Signals */
-       void    (* changed)     (EMailSendAccountOverride *account_override);
+       void            (*changed)      (EMailSendAccountOverride *override);
 };
 
-GType          e_mail_send_account_override_get_type           (void);
+GType          e_mail_send_account_override_get_type
+                                       (void) G_GNUC_CONST;
 EMailSendAccountOverride *
-               e_mail_send_account_override_new                (const gchar *config_filename);
+               e_mail_send_account_override_new
+                                       (const gchar *config_filename);
 void           e_mail_send_account_override_set_config_filename
-                                                               (EMailSendAccountOverride *account_override,
-                                                                const gchar *config_filename);
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *config_filename);
 gchar *                e_mail_send_account_override_dup_config_filename
-                                                               (EMailSendAccountOverride *account_override);
-void           e_mail_send_account_override_set_prefer_folder  (EMailSendAccountOverride *account_override,
-                                                                gboolean prefer_folder);
-gboolean       e_mail_send_account_override_get_prefer_folder  (EMailSendAccountOverride *account_override);
-gchar *                e_mail_send_account_override_get_account_uid    (EMailSendAccountOverride 
*account_override,
-                                                                const gchar *folder_uri,
-                                                                const CamelInternetAddress *recipients_to,
-                                                                const CamelInternetAddress *recipients_cc,
-                                                                const CamelInternetAddress *recipients_bcc);
+                                       (EMailSendAccountOverride *override);
+void           e_mail_send_account_override_set_prefer_folder
+                                       (EMailSendAccountOverride *override,
+                                        gboolean prefer_folder);
+gboolean       e_mail_send_account_override_get_prefer_folder
+                                       (EMailSendAccountOverride *override);
+gchar *                e_mail_send_account_override_get_account_uid
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *folder_uri,
+                                        CamelInternetAddress *recipients_to,
+                                        CamelInternetAddress *recipients_cc,
+                                        CamelInternetAddress *recipients_bcc);
 void           e_mail_send_account_override_remove_for_account_uid
-                                                               (EMailSendAccountOverride *account_override,
-                                                                const gchar *account_uid);
-gchar *                e_mail_send_account_override_get_for_folder     (EMailSendAccountOverride 
*account_override,
-                                                                const gchar *folder_uri);
-void           e_mail_send_account_override_set_for_folder     (EMailSendAccountOverride *account_override,
-                                                                const gchar *folder_uri,
-                                                                const gchar *account_uid);
-void           e_mail_send_account_override_remove_for_folder  (EMailSendAccountOverride *account_override,
-                                                                const gchar *folder_uri);
-gchar *                e_mail_send_account_override_get_for_recipient  (EMailSendAccountOverride 
*account_override,
-                                                                const CamelInternetAddress *recipients);
-void           e_mail_send_account_override_set_for_recipient  (EMailSendAccountOverride *account_override,
-                                                                const gchar *recipient,
-                                                                const gchar *account_uid);
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *account_uid);
+gchar *                e_mail_send_account_override_get_for_folder
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *folder_uri);
+void           e_mail_send_account_override_set_for_folder
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *folder_uri,
+                                        const gchar *account_uid);
+void           e_mail_send_account_override_remove_for_folder
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *folder_uri);
+gchar *                e_mail_send_account_override_get_for_recipient
+                                       (EMailSendAccountOverride *override,
+                                        CamelInternetAddress *recipients);
+void           e_mail_send_account_override_set_for_recipient
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *recipient,
+                                        const gchar *account_uid);
 void           e_mail_send_account_override_remove_for_recipient
-                                                               (EMailSendAccountOverride *account_override,
-                                                                const gchar *recipient);
-void           e_mail_send_account_override_list_for_account   (EMailSendAccountOverride *account_override,
-                                                                const gchar *account_uid,
-                                                                GSList **folder_overrides,
-                                                                GSList **recipient_overrides);
-void           e_mail_send_account_override_freeze_save        (EMailSendAccountOverride *account_override);
-void           e_mail_send_account_override_thaw_save          (EMailSendAccountOverride *account_override);
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *recipient);
+void           e_mail_send_account_override_list_for_account
+                                       (EMailSendAccountOverride *override,
+                                        const gchar *account_uid,
+                                        GList **folder_overrides,
+                                        GList **recipient_overrides);
+void           e_mail_send_account_override_freeze_save
+                                       (EMailSendAccountOverride *override);
+void           e_mail_send_account_override_thaw_save
+                                       (EMailSendAccountOverride *override);
 
 G_END_DECLS
 
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 44e8619..edd33ca 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -3153,8 +3153,8 @@ em_configure_new_composer (EMsgComposer *composer,
 /* free returned pointer with g_object_unref(), if not NULL */
 ESource *
 em_utils_check_send_account_override (EShell *shell,
-                                     CamelMimeMessage *message,
-                                     CamelFolder *folder)
+                                      CamelMimeMessage *message,
+                                      CamelFolder *folder)
 {
        EMailBackend *mail_backend;
        EMailSendAccountOverride *account_override;
@@ -3190,7 +3190,7 @@ em_utils_check_send_account_override (EShell *shell,
                        break;
 
                /* stored send account override settings contain a reference
-                  to a dropped account, thus cleanup it now */
+                * to a dropped account, thus cleanup it now */
                e_mail_send_account_override_remove_for_account_uid (account_override, account_uid);
 
                g_free (account_uid);
@@ -3205,8 +3205,8 @@ em_utils_check_send_account_override (EShell *shell,
 
 void
 em_utils_apply_send_account_override_to_composer (EMsgComposer *composer,
-                                                 EShell *shell,
-                                                 CamelFolder *folder)
+                                                  EShell *shell,
+                                                  CamelFolder *folder)
 {
        CamelMimeMessage *message;
        EComposerHeaderTable *header_table;
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index b56dffb..a3a9e94 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -83,7 +83,7 @@ emfp_free (EConfig *ec,
 
 static void
 mail_identity_combo_box_changed_cb (GtkComboBox *combo_box,
-                                   EMailSendAccountOverride *account_override)
+                                    EMailSendAccountOverride *account_override)
 {
        const gchar *active_id, *folder_uri;
 
@@ -298,7 +298,8 @@ emfp_get_folder_item (EConfig *ec,
                        GTK_FILL, 0, 0, 0);
                row++;
 
-               widget = g_object_new (E_TYPE_MAIL_IDENTITY_COMBO_BOX,
+               widget = g_object_new (
+                       E_TYPE_MAIL_IDENTITY_COMBO_BOX,
                        "registry", registry,
                        "allow-none", TRUE,
                        NULL);
@@ -322,7 +323,8 @@ emfp_get_folder_item (EConfig *ec,
                gtk_combo_box_set_active_id (GTK_COMBO_BOX (widget), account_uid ? account_uid : "");
                g_object_set_data_full (G_OBJECT (widget), "sao-folder-uri", folder_uri, g_free);
 
-               g_signal_connect (widget, "changed",
+               g_signal_connect (
+                       widget, "changed",
                        G_CALLBACK (mail_identity_combo_box_changed_cb), account_override);
 
                g_free (account_uid);
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 88240e9..e210652 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -1430,17 +1430,18 @@ subscription_editor_add_store (EMSubscriptionEditor *editor,
 
 static void
 emse_notebook_sensitive_changed_cb (GtkWidget *notebook,
-                                   GParamSpec *param,
-                                   GtkDialog *editor)
+                                    GParamSpec *param,
+                                    GtkDialog *editor)
 {
-       gtk_dialog_set_response_sensitive (editor,
-               GTK_RESPONSE_CLOSE, gtk_widget_get_sensitive (notebook));
+       gtk_dialog_set_response_sensitive (
+               editor, GTK_RESPONSE_CLOSE,
+               gtk_widget_get_sensitive (notebook));
 }
 
 static gboolean
 subscription_editor_delete_event_cb (EMSubscriptionEditor *editor,
-                                    GdkEvent *event,
-                                    gpointer user_data)
+                                     GdkEvent *event,
+                                     gpointer user_data)
 {
        /* stop processing if the button is insensitive */
        return !gtk_widget_get_sensitive (editor->priv->notebook);
@@ -1448,8 +1449,8 @@ subscription_editor_delete_event_cb (EMSubscriptionEditor *editor,
 
 static void
 subscription_editor_response_cb (EMSubscriptionEditor *editor,
-                                gint response_id,
-                                gpointer user_data)
+                                 gint response_id,
+                                 gpointer user_data)
 {
        if (!gtk_widget_get_sensitive (editor->priv->notebook))
                g_signal_stop_emission_by_name (editor, "response");
@@ -1801,7 +1802,8 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
                G_BINDING_BIDIRECTIONAL |
                G_BINDING_SYNC_CREATE);
 
-       g_signal_connect (widget, "notify::sensitive",
+       g_signal_connect (
+               widget, "notify::sensitive",
                G_CALLBACK (emse_notebook_sensitive_changed_cb), editor);
 
        widget = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 03b8523..bd2d039 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -255,15 +255,15 @@ sao_dup_account_uid (GtkBuilder *builder)
 
 static void
 sao_fill_overrides (GtkBuilder *builder,
-                   const gchar *tree_view_name,
-                   GSList *overrides,
-                   gboolean is_folder)
+                    const gchar *tree_view_name,
+                    GList *overrides,
+                    gboolean is_folder)
 {
        CamelSession *session = NULL;
        GtkWidget *widget;
        GtkListStore *list_store;
        GtkTreeIter titer;
-       GSList *oiter;
+       GList *oiter;
 
        widget = e_builder_get_widget (builder, tree_view_name);
        g_return_if_fail (GTK_IS_TREE_VIEW (widget));
@@ -276,7 +276,7 @@ sao_fill_overrides (GtkBuilder *builder,
        if (is_folder)
                session = g_object_get_data (G_OBJECT (builder), MAIL_CAMEL_SESSION_KEY);
 
-       for (oiter = overrides; oiter; oiter = g_slist_next (oiter)) {
+       for (oiter = overrides; oiter; oiter = g_list_next (oiter)) {
                const gchar *value = oiter->data;
                gchar *markup = NULL;
 
@@ -303,7 +303,7 @@ sao_fill_overrides (GtkBuilder *builder,
 
 static void
 sao_account_treeview_selection_changed_cb (GtkTreeSelection *selection,
-                                          GtkBuilder *builder)
+                                           GtkBuilder *builder)
 {
        GtkTreeModel *model = NULL;
        GtkWidget *widget;
@@ -327,19 +327,26 @@ sao_account_treeview_selection_changed_cb (GtkTreeSelection *selection,
 
                account_uid = sao_dup_account_uid (builder);
                if (account_uid) {
-                       GSList *folder_overrides = NULL, *recipient_overrides = NULL;
+                       GList *folder_overrides = NULL;
+                       GList *recipient_overrides = NULL;
 
                        enable = TRUE;
 
                        e_mail_send_account_override_list_for_account (
-                               g_object_get_data (G_OBJECT (builder), MAIL_SEND_ACCOUNT_OVERRIDE_KEY),
+                               g_object_get_data (
+                                       G_OBJECT (builder),
+                                       MAIL_SEND_ACCOUNT_OVERRIDE_KEY),
                                account_uid, &folder_overrides, &recipient_overrides);
 
-                       sao_fill_overrides (builder, "sao-folders-treeview", folder_overrides, TRUE);
-                       sao_fill_overrides (builder, "sao-recipients-treeview", recipient_overrides, FALSE);
+                       sao_fill_overrides (
+                               builder, "sao-folders-treeview",
+                               folder_overrides, TRUE);
+                       sao_fill_overrides (
+                               builder, "sao-recipients-treeview",
+                               recipient_overrides, FALSE);
 
-                       g_slist_free_full (folder_overrides, g_free);
-                       g_slist_free_full (recipient_overrides, g_free);
+                       g_list_free_full (folder_overrides, g_free);
+                       g_list_free_full (recipient_overrides, g_free);
                        g_free (account_uid);
                }
        }
@@ -355,7 +362,7 @@ sao_account_treeview_selection_changed_cb (GtkTreeSelection *selection,
 
 static void
 sao_overrides_changed_cb (EMailSendAccountOverride *account_override,
-                         GtkBuilder *builder)
+                          GtkBuilder *builder)
 {
        GtkWidget *widget;
        GtkTreeSelection *selection;
@@ -392,7 +399,7 @@ sao_unblock_changed_handler (GtkBuilder *builder)
 
 static void
 sao_folders_treeview_selection_changed_cb (GtkTreeSelection *selection,
-                                          GtkBuilder *builder)
+                                           GtkBuilder *builder)
 {
        GtkWidget *widget;
        gint nselected;
@@ -409,7 +416,7 @@ sao_folders_treeview_selection_changed_cb (GtkTreeSelection *selection,
 
 static void
 sao_folders_add_button_clicked_cb (GtkButton *button,
-                                  GtkBuilder *builder)
+                                   GtkBuilder *builder)
 {
        GtkTreeSelection *selection;
        GtkTreeView *tree_view;
@@ -499,7 +506,7 @@ sao_folders_add_button_clicked_cb (GtkButton *button,
 
 static void
 sao_folders_remove_button_clicked_cb (GtkButton *button,
-                                     GtkBuilder *builder)
+                                      GtkBuilder *builder)
 {
        EMailSendAccountOverride *account_override;
        GtkTreeSelection *selection;
@@ -549,7 +556,7 @@ sao_folders_remove_button_clicked_cb (GtkButton *button,
 
 static void
 sao_recipients_treeview_selection_changed_cb (GtkTreeSelection *selection,
-                                             GtkBuilder *builder)
+                                              GtkBuilder *builder)
 {
        GtkWidget *widget;
        gint nselected;
@@ -570,9 +577,9 @@ sao_recipients_treeview_selection_changed_cb (GtkTreeSelection *selection,
 
 static void
 sao_recipient_edited_cb (GtkCellRendererText *renderer,
-                        const gchar *path_str,
-                        const gchar *new_text,
-                        GtkBuilder *builder)
+                         const gchar *path_str,
+                         const gchar *new_text,
+                         GtkBuilder *builder)
 {
        EMailSendAccountOverride *account_override;
        GtkTreePath *path;
@@ -652,7 +659,7 @@ sao_recipient_edited_cb (GtkCellRendererText *renderer,
 
 static void
 sao_recipient_editing_canceled_cb (GtkCellRenderer *renderer,
-                                  GtkBuilder *builder)
+                                   GtkBuilder *builder)
 {
        GtkTreeModel *model;
        GtkTreeIter iter;
@@ -684,7 +691,7 @@ sao_recipient_editing_canceled_cb (GtkCellRenderer *renderer,
 
 static void
 sao_recipients_add_button_clicked_cb (GtkButton *button,
-                                     GtkBuilder *builder)
+                                      GtkBuilder *builder)
 {
        GtkTreeView *tree_view;
        GtkTreeViewColumn *column;
@@ -733,7 +740,7 @@ sao_recipients_add_button_clicked_cb (GtkButton *button,
 
 static void
 sao_recipients_edit_button_clicked_cb (GtkButton *button,
-                                      GtkBuilder *builder)
+                                       GtkBuilder *builder)
 {
        GtkTreeView *tree_view;
        GtkTreeViewColumn *column;
@@ -777,7 +784,7 @@ sao_recipients_edit_button_clicked_cb (GtkButton *button,
 
 static void
 sao_recipients_remove_button_clicked_cb (GtkButton *button,
-                                        GtkBuilder *builder)
+                                         GtkBuilder *builder)
 {
        EMailSendAccountOverride *account_override;
        GtkTreeSelection *selection;
@@ -827,8 +834,8 @@ sao_recipients_remove_button_clicked_cb (GtkButton *button,
 
 static void
 send_account_override_setup (GtkBuilder *builder,
-                            EMailBackend *mail_backend,
-                            ESourceRegistry *registry)
+                             EMailBackend *mail_backend,
+                             ESourceRegistry *registry)
 {
        EMailIdentityComboBox *identity_combo_box;
        EMailSendAccountOverride *account_override;
@@ -852,20 +859,24 @@ send_account_override_setup (GtkBuilder *builder,
 
        tree_view = GTK_TREE_VIEW (widget);
 
-       g_object_set_data_full (G_OBJECT (tree_view), "identity-combo-box",
+       g_object_set_data_full (
+               G_OBJECT (tree_view), "identity-combo-box",
                identity_combo_box, (GDestroyNotify) gtk_widget_destroy);
-       g_object_set_data_full (G_OBJECT (builder), MAIL_CAMEL_SESSION_KEY,
+       g_object_set_data_full (
+               G_OBJECT (builder), MAIL_CAMEL_SESSION_KEY,
                g_object_ref (e_mail_backend_get_session (mail_backend)), g_object_unref);
 
        model = gtk_combo_box_get_model (GTK_COMBO_BOX (identity_combo_box));
 
        gtk_tree_view_set_model (tree_view, model);
-       gtk_tree_view_insert_column_with_attributes (tree_view, -1, _("Account"),
+       gtk_tree_view_insert_column_with_attributes (
+               tree_view, -1, _("Account"),
                gtk_cell_renderer_text_new (),
                "text", 0, NULL);
 
        selection = gtk_tree_view_get_selection (tree_view);
-       g_signal_connect (selection, "changed",
+       g_signal_connect (
+               selection, "changed",
                G_CALLBACK (sao_account_treeview_selection_changed_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-folders-treeview");
@@ -876,24 +887,28 @@ send_account_override_setup (GtkBuilder *builder,
        /* markup, folder-uri */
        list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
        gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (list_store));
-       gtk_tree_view_insert_column_with_attributes (tree_view, -1, _("Folder"),
+       gtk_tree_view_insert_column_with_attributes (
+               tree_view, -1, _("Folder"),
                gtk_cell_renderer_text_new (),
                "markup", 0, NULL);
        g_object_unref (list_store);
 
        selection = gtk_tree_view_get_selection (tree_view);
-       g_signal_connect (selection, "changed",
+       g_signal_connect (
+               selection, "changed",
                G_CALLBACK (sao_folders_treeview_selection_changed_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-folders-add-button");
        g_return_if_fail (GTK_IS_BUTTON (widget));
-       g_signal_connect (widget, "clicked",
+       g_signal_connect (
+               widget, "clicked",
                G_CALLBACK (sao_folders_add_button_clicked_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-folders-remove-button");
        g_return_if_fail (GTK_IS_BUTTON (widget));
        gtk_widget_set_sensitive (widget, FALSE);
-       g_signal_connect (widget, "clicked",
+       g_signal_connect (
+               widget, "clicked",
                G_CALLBACK (sao_folders_remove_button_clicked_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-recipients-treeview");
@@ -908,29 +923,34 @@ send_account_override_setup (GtkBuilder *builder,
 
        list_store = gtk_list_store_new (1, G_TYPE_STRING);
        gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (list_store));
-       gtk_tree_view_insert_column_with_attributes (tree_view, -1, _("Recipient"),
+       gtk_tree_view_insert_column_with_attributes (
+               tree_view, -1, _("Recipient"),
                renderer, "text", 0, NULL);
        g_object_unref (list_store);
 
        selection = gtk_tree_view_get_selection (tree_view);
-       g_signal_connect (selection, "changed",
+       g_signal_connect (
+               selection, "changed",
                G_CALLBACK (sao_recipients_treeview_selection_changed_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-recipients-add-button");
        g_return_if_fail (GTK_IS_BUTTON (widget));
-       g_signal_connect (widget, "clicked",
+       g_signal_connect (
+               widget, "clicked",
                G_CALLBACK (sao_recipients_add_button_clicked_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-recipients-edit-button");
        g_return_if_fail (GTK_IS_BUTTON (widget));
        gtk_widget_set_sensitive (widget, FALSE);
-       g_signal_connect (widget, "clicked",
+       g_signal_connect (
+               widget, "clicked",
                G_CALLBACK (sao_recipients_edit_button_clicked_cb), builder);
 
        widget = e_builder_get_widget (builder, "sao-recipients-remove-button");
        g_return_if_fail (GTK_IS_BUTTON (widget));
        gtk_widget_set_sensitive (widget, FALSE);
-       g_signal_connect (widget, "clicked",
+       g_signal_connect (
+               widget, "clicked",
                G_CALLBACK (sao_recipients_remove_button_clicked_cb), builder);
 
        /* init view */
@@ -1232,7 +1252,8 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
        g_return_if_fail (mail_backend != NULL);
 
        send_override = e_mail_backend_get_send_account_override (mail_backend);
-       g_object_set_data_full (G_OBJECT (prefs->builder), MAIL_SEND_ACCOUNT_OVERRIDE_KEY,
+       g_object_set_data_full (
+               G_OBJECT (prefs->builder), MAIL_SEND_ACCOUNT_OVERRIDE_KEY,
                g_object_ref (send_override), g_object_unref);
 
        send_account_override_setup (prefs->builder, mail_backend, registry);
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index 53db054..d8f3bfc 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -90,7 +90,7 @@ shell_taskbar_free_idle_data (gpointer data)
 
 static void
 shell_taskbar_remove_proxy_container (EShellTaskbar *shell_taskbar,
-                                     GtkWidget *proxy)
+                                      GtkWidget *proxy)
 {
        GList *children;
        GtkContainer *container;
@@ -141,7 +141,9 @@ shell_taskbar_weak_notify_cb (EShellTaskbar *shell_taskbar,
                idle_data->shell_taskbar = g_object_ref (shell_taskbar);
                idle_data->proxy = proxy;
 
-               g_idle_add_full (G_PRIORITY_DEFAULT, shell_taskbar_remove_proxy_container_idle_cb,
+               g_idle_add_full (
+                       G_PRIORITY_DEFAULT,
+                       shell_taskbar_remove_proxy_container_idle_cb,
                        idle_data, shell_taskbar_free_idle_data);
        }
 }
@@ -200,7 +202,7 @@ shell_taskbar_add_activity_idle_cb (gpointer user_data)
 
 static void
 shell_taskbar_activity_added_cb (EShellTaskbar *shell_taskbar,
-                                EActivity *activity)
+                                 EActivity *activity)
 {
        if (shell_taskbar->priv->main_thread == g_thread_self ()) {
                shell_taskbar_activity_add (shell_taskbar, activity);
@@ -211,7 +213,9 @@ shell_taskbar_activity_added_cb (EShellTaskbar *shell_taskbar,
                idle_data->shell_taskbar = g_object_ref (shell_taskbar);
                idle_data->activity = g_object_ref (activity);
 
-               g_idle_add_full (G_PRIORITY_DEFAULT, shell_taskbar_add_activity_idle_cb,
+               g_idle_add_full (
+                       G_PRIORITY_DEFAULT,
+                       shell_taskbar_add_activity_idle_cb,
                        idle_data, shell_taskbar_free_idle_data);
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]