aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-21 22:02:58 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-22 05:56:06 +0800
commitcb97c2dc8fd97b381af048f206333d5e557892ae (patch)
treec2901380e607a3b439abb1bed165344ba8f4fc83 /mail
parent64fa8ad9c0851e2d5c1e90ac2e75af8d455d9fea (diff)
downloadgsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.gz
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.bz2
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.lz
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.xz
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.zst
gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-browser.c8
-rw-r--r--mail/e-mail-folder-utils.c5
-rw-r--r--mail/e-mail-migrate.c117
-rw-r--r--mail/e-mail-session-utils.c6
-rw-r--r--mail/e-mail-store.c4
-rw-r--r--mail/em-composer-utils.c7
-rw-r--r--mail/em-folder-properties.c9
-rw-r--r--mail/em-folder-selector.c55
-rw-r--r--mail/em-folder-tree.c14
-rw-r--r--mail/em-folder-utils.c19
-rw-r--r--mail/em-format-html-print.h7
-rw-r--r--mail/em-utils.c30
-rw-r--r--mail/importers/evolution-mbox-importer.c6
-rw-r--r--mail/importers/pine-importer.c8
-rw-r--r--mail/mail-ops.c135
-rw-r--r--mail/mail-send-recv.c8
-rw-r--r--mail/mail-tools.c6
-rw-r--r--mail/mail-vfolder.c26
18 files changed, 335 insertions, 135 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 63bfb4d5b5..2179522c60 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -313,8 +313,9 @@ mail_browser_popup_event_cb (EMailBrowser *browser,
GdkEventButton *event,
const gchar *uri)
{
- EMFormatHTML *html_formatter;
+ EMFormatHTML *formatter;
EMailReader *reader;
+ EWebView *web_view;
GtkMenu *menu;
guint32 state;
@@ -322,9 +323,10 @@ mail_browser_popup_event_cb (EMailBrowser *browser,
return FALSE;
reader = E_MAIL_READER (browser);
- html_formatter = e_mail_reader_get_formatter (reader);
+ formatter = e_mail_reader_get_formatter (reader);
+ web_view = em_format_html_get_web_view (formatter);
- if (html_formatter && e_web_view_get_cursor_image (em_format_html_get_web_view (html_formatter)) != NULL)
+ if (e_web_view_get_cursor_image (web_view) != NULL)
return FALSE;
menu = e_mail_reader_get_popup_menu (reader);
diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c
index e0b4471041..f621d7464d 100644
--- a/mail/e-mail-folder-utils.c
+++ b/mail/e-mail-folder-utils.c
@@ -1419,10 +1419,11 @@ e_mail_folder_uri_parse (CamelSession *session,
if (url->host != NULL) {
gchar *uid;
- if (!url->user || !*url->user)
+ if (url->user == NULL || *url->user == '\0')
uid = g_strdup (url->host);
else
- uid = g_strconcat (url->user, "@", url->host, NULL);
+ uid = g_strconcat (
+ url->user, "@", url->host, NULL);
service = camel_session_get_service (session, uid);
g_free (uid);
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 3866148a22..de74f8175e 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -158,7 +158,10 @@ em_migrate_setup_progress_dialog (const gchar *title, const gchar *desc)
w = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.0);
- markup = g_strconcat ("<big><b>", title ? title : _("Migration"), "</b></big>", NULL);
+ markup = g_strconcat (
+ "<big><b>",
+ title ? title : _("Migration"),
+ "</b></big>", NULL);
gtk_label_set_markup (GTK_LABEL (w), markup);
gtk_box_pack_start (GTK_BOX (vbox), w, TRUE, TRUE, 0);
g_free (markup);
@@ -419,8 +422,8 @@ is_in_plugs_list (GSList *list, const gchar *value)
/*
* em_update_message_notify_settings_2_21
- * DBus plugin and sound email notification was merged to mail-notification plugin,
- * so move these options to new locations.
+ * DBus plugin and sound email notification was merged to
+ * mail-notification plugin, so move the options to new locations.
*/
static void
em_update_message_notify_settings_2_21 (void)
@@ -434,7 +437,9 @@ em_update_message_notify_settings_2_21 (void)
client = gconf_client_get_default ();
- is_key = gconf_client_get (client, "/apps/evolution/eplugin/mail-notification/dbus-enabled", NULL);
+ is_key = gconf_client_get (
+ client,
+ "/apps/evolution/eplugin/mail-notification/dbus-enabled", NULL);
if (is_key) {
/* already migrated, so do not migrate again */
gconf_value_free (is_key);
@@ -443,20 +448,38 @@ em_update_message_notify_settings_2_21 (void)
return;
}
- gconf_client_set_bool (client, "/apps/evolution/eplugin/mail-notification/status-blink-icon",
- gconf_client_get_bool (client, "/apps/evolution/mail/notification/blink-status-icon", NULL), NULL);
- gconf_client_set_bool (client, "/apps/evolution/eplugin/mail-notification/status-notification",
- gconf_client_get_bool (client, "/apps/evolution/mail/notification/notification", NULL), NULL);
-
- list = gconf_client_get_list (client, "/apps/evolution/eplugin/disabled", GCONF_VALUE_STRING, NULL);
+ gconf_client_set_bool (
+ client,
+ "/apps/evolution/eplugin/mail-notification/status-blink-icon",
+ gconf_client_get_bool (
+ client,
+ "/apps/evolution/mail/notification/blink-status-icon",
+ NULL), NULL);
+ gconf_client_set_bool (
+ client,
+ "/apps/evolution/eplugin/mail-notification/status-notification",
+ gconf_client_get_bool (
+ client,
+ "/apps/evolution/mail/notification/notification",
+ NULL), NULL);
+
+ list = gconf_client_get_list (
+ client, "/apps/evolution/eplugin/disabled",
+ GCONF_VALUE_STRING, NULL);
dbus = !is_in_plugs_list (list, "org.gnome.evolution.new_mail_notify");
- status = !is_in_plugs_list (list, "org.gnome.evolution.mail_notification");
-
- gconf_client_set_bool (client, "/apps/evolution/eplugin/mail-notification/dbus-enabled", dbus, NULL);
- gconf_client_set_bool (client, "/apps/evolution/eplugin/mail-notification/status-enabled", status, NULL);
+ status = !is_in_plugs_list (
+ list, "org.gnome.evolution.mail_notification");
+
+ gconf_client_set_bool (
+ client,
+ "/apps/evolution/eplugin/mail-notification/dbus-enabled",
+ dbus, NULL);
+ gconf_client_set_bool (
+ client,
+ "/apps/evolution/eplugin/mail-notification/status-enabled",
+ status, NULL);
if (!status) {
- /* enable this plugin, because it holds all those other things */
GSList *plugins, *l;
plugins = e_plugin_list_plugins ();
@@ -464,7 +487,8 @@ em_update_message_notify_settings_2_21 (void)
for (l = plugins; l; l = l->next) {
EPlugin *p = l->data;
- if (p && p->id && !strcmp (p->id, "org.gnome.evolution.mail_notification")) {
+ if (p && p->id && !strcmp (p->id,
+ "org.gnome.evolution.mail_notification")) {
e_plugin_enable (p, 1);
break;
}
@@ -477,12 +501,23 @@ em_update_message_notify_settings_2_21 (void)
g_slist_foreach (list, (GFunc) g_free, NULL);
g_slist_free (list);
- val = gconf_client_get_int (client, "/apps/evolution/mail/notify/type", NULL);
- gconf_client_set_bool (client, "/apps/evolution/eplugin/mail-notification/sound-enabled", val == 1 || val == 2, NULL);
- gconf_client_set_bool (client, "/apps/evolution/eplugin/mail-notification/sound-beep", val == 0 || val == 1, NULL);
-
- str = gconf_client_get_string (client, "/apps/evolution/mail/notify/sound", NULL);
- gconf_client_set_string (client, "/apps/evolution/eplugin/mail-notification/sound-file", str ? str : "", NULL);
+ val = gconf_client_get_int (
+ client, "/apps/evolution/mail/notify/type", NULL);
+ gconf_client_set_bool (
+ client,
+ "/apps/evolution/eplugin/mail-notification/sound-enabled",
+ val == 1 || val == 2, NULL);
+ gconf_client_set_bool (
+ client,
+ "/apps/evolution/eplugin/mail-notification/sound-beep",
+ val == 0 || val == 1, NULL);
+
+ str = gconf_client_get_string (
+ client, "/apps/evolution/mail/notify/sound", NULL);
+ gconf_client_set_string (
+ client,
+ "/apps/evolution/eplugin/mail-notification/sound-file",
+ str ? str : "", NULL);
g_free (str);
g_object_unref (client);
@@ -497,12 +532,16 @@ em_update_sa_junk_setting_2_23 (void)
client = gconf_client_get_default ();
- key = gconf_client_get (client, "/apps/evolution/mail/junk/default_plugin", NULL);
+ key = gconf_client_get (
+ client, "/apps/evolution/mail/junk/default_plugin", NULL);
if (key) {
const gchar *str = gconf_value_get_string (key);
if (str && strcmp (str, "Spamassasin") == 0)
- gconf_client_set_string (client, "/apps/evolution/mail/junk/default_plugin", "SpamAssassin", NULL);
+ gconf_client_set_string (
+ client,
+ "/apps/evolution/mail/junk/default_plugin",
+ "SpamAssassin", NULL);
gconf_value_free (key);
g_object_unref (client);
@@ -574,7 +613,9 @@ migrate_folders (CamelStore *store,
if (folder != NULL)
camel_folder_summary_migrate_infos (folder->summary);
- migrate_folders (store, is_local, fi->child, acc, done, nth_folder, total_folders);
+ migrate_folders (
+ store, is_local, fi->child,
+ acc, done, nth_folder, total_folders);
fi = fi->next;
}
@@ -732,7 +773,10 @@ migrate_to_db (EShellBackend *shell_backend)
migrate_dbs.store = store;
migrate_dbs.done = FALSE;
- g_thread_create ((GThreadFunc) migrate_folders_to_db_thread, &migrate_dbs, TRUE, NULL);
+ g_thread_create (
+ (GThreadFunc)
+ migrate_folders_to_db_thread,
+ &migrate_dbs, TRUE, NULL);
while (!migrate_dbs.done)
g_main_context_iteration (NULL, TRUE);
} else
@@ -794,7 +838,10 @@ sanitize_maildir_folder_name (gchar *folder_name)
}
static void
-copy_folder (CamelStore *mbox_store, CamelStore *maildir_store, const gchar *mbox_fname, const gchar *maildir_fname)
+copy_folder (CamelStore *mbox_store,
+ CamelStore *maildir_store,
+ const gchar *mbox_fname,
+ const gchar *maildir_fname)
{
CamelFolder *fromfolder, *tofolder;
GPtrArray *uids;
@@ -828,7 +875,10 @@ copy_folder (CamelStore *mbox_store, CamelStore *maildir_store, const gchar *mbo
}
static void
-copy_folders (CamelStore *mbox_store, CamelStore *maildir_store, CamelFolderInfo *fi, EMMigrateSession *session)
+copy_folders (CamelStore *mbox_store,
+ CamelStore *maildir_store,
+ CamelFolderInfo *fi,
+ EMMigrateSession *session)
{
if (fi) {
if (!g_str_has_prefix (fi->full_name, ".#evolution")) {
@@ -1070,7 +1120,8 @@ em_ensure_proxy_ignore_hosts_being_list (void)
GConfClient *client;
GConfValue *key_value;
- /* makes sure the 'key' is a list of strings, not a string, as set by previous versions */
+ /* Makes sure the 'key' is a list of strings, not a string,
+ * as set by previous versions. */
client = gconf_client_get_default ();
key_value = gconf_client_get (client, key, NULL);
@@ -1110,7 +1161,9 @@ em_ensure_proxy_ignore_hosts_being_list (void)
g_free (value);
if (error) {
- fprintf (stderr, "%s: Failed to set a list values with error: %s\n", G_STRFUNC, error->message);
+ fprintf (
+ stderr, "%s: Failed to set a list values "
+ "with error: %s\n", G_STRFUNC, error->message);
g_error_free (error);
}
}
@@ -1160,7 +1213,9 @@ e_mail_migrate (EShellBackend *shell_backend,
}
#else
if (major < 2 || (major == 2 && minor < 24))
- g_debug ("Upgrading from ancient versions %d.%d not supported on Windows", major, minor);
+ g_debug (
+ "Upgrading from ancient versions %d.%d "
+ "not supported on Windows", major, minor);
#endif
if (major < 2 || (major == 2 && minor < 32)) {
diff --git a/mail/e-mail-session-utils.c b/mail/e-mail-session-utils.c
index ae9bd96a39..2baf2632a0 100644
--- a/mail/e-mail-session-utils.c
+++ b/mail/e-mail-session-utils.c
@@ -408,8 +408,10 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
if (!CAMEL_IS_TRANSPORT (service)) {
g_simple_async_result_set_error (simple,
- CAMEL_SERVICE_ERROR, CAMEL_SERVICE_ERROR_URL_INVALID,
- _("Cannot get transport service for account '%s'"), context->transport_uid);
+ CAMEL_SERVICE_ERROR,
+ CAMEL_SERVICE_ERROR_URL_INVALID,
+ _("Cannot get transport for account '%s'"),
+ context->transport_uid);
return;
}
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index d61f8521dc..17ff7652ba 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -329,7 +329,9 @@ e_mail_store_add_by_account (EMailSession *session,
g_free (transport_uid);
if (transport_error) {
- g_warning ("%s: Failed to add transport service: %s", G_STRFUNC, transport_error->message);
+ g_warning (
+ "%s: Failed to add transport service: %s",
+ G_STRFUNC, transport_error->message);
g_error_free (transport_error);
}
}
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index e72e5db257..bc836a890d 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1139,9 +1139,10 @@ static struct {
} conf_messages[] = {
[QUOTING_ATTRIBUTION] =
{ "/apps/evolution/mail/composer/message_attribution",
- /* Note to translators: this is the attribution string used when quoting messages.
- * each ${Variable} gets replaced with a value. To see a full list of available
- * variables, see mail/em-composer-utils.c:attribvars array */
+ /* Note to translators: this is the attribution string used
+ * when quoting messages. Each ${Variable} gets replaced
+ * with a value. To see a full list of available variables,
+ * see mail/em-composer-utils.c:attribvars array. */
N_("On ${AbbrevWeekdayName}, ${Year}-${Month}-${Day} at "
"${24Hour}:${Minute} ${TimeZone}, ${Sender} wrote:")
},
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index d61212f317..090dcd75c4 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -228,9 +228,12 @@ emfp_get_folder_item (EConfig *ec,
static EMConfigItem emfp_items[] = {
{ E_CONFIG_BOOK, (gchar *) "", NULL },
- { E_CONFIG_PAGE, (gchar *) "00.general", (gchar *) N_("General") },
- { E_CONFIG_SECTION, (gchar *) "00.general/00.folder", NULL /* set by code */ },
- { E_CONFIG_ITEM, (gchar *) "00.general/00.folder/00.info", NULL, emfp_get_folder_item },
+ { E_CONFIG_PAGE, (gchar *) "00.general",
+ (gchar *) N_("General") },
+ { E_CONFIG_SECTION, (gchar *) "00.general/00.folder",
+ NULL /* set by code */ },
+ { E_CONFIG_ITEM, (gchar *) "00.general/00.folder/00.info",
+ NULL, emfp_get_folder_item },
};
static gboolean emfp_items_translated = FALSE;
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 5bf3b3f1c6..0f2bbc79f2 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -164,7 +164,12 @@ folder_activated_cb (EMFolderTree *emft,
}
void
-em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel)
+em_folder_selector_construct (EMFolderSelector *emfs,
+ EMFolderTree *emft,
+ guint32 flags,
+ const gchar *title,
+ const gchar *text,
+ const gchar *oklabel)
{
GtkWidget *container;
GtkWidget *widget;
@@ -179,15 +184,23 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
emfs->flags = flags;
if (flags & EM_FOLDER_SELECTOR_CAN_CREATE) {
- gtk_dialog_add_button (GTK_DIALOG (emfs), GTK_STOCK_NEW, EM_FOLDER_SELECTOR_RESPONSE_NEW);
- g_signal_connect (emfs, "response", G_CALLBACK (emfs_response), emfs);
+ gtk_dialog_add_button (
+ GTK_DIALOG (emfs), GTK_STOCK_NEW,
+ EM_FOLDER_SELECTOR_RESPONSE_NEW);
+ g_signal_connect (
+ emfs, "response",
+ G_CALLBACK (emfs_response), emfs);
}
- gtk_dialog_add_buttons (GTK_DIALOG (emfs), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- oklabel?oklabel:GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+ gtk_dialog_add_buttons (
+ GTK_DIALOG (emfs),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ oklabel ? oklabel : GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (emfs), GTK_RESPONSE_OK, FALSE);
- gtk_dialog_set_default_response (GTK_DIALOG (emfs), GTK_RESPONSE_OK);
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (emfs), GTK_RESPONSE_OK, FALSE);
+ gtk_dialog_set_default_response (
+ GTK_DIALOG (emfs), GTK_RESPONSE_OK);
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (
@@ -202,8 +215,12 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (emft));
gtk_widget_show (GTK_WIDGET (emft));
- g_signal_connect (emfs->emft, "folder-selected", G_CALLBACK (folder_selected_cb), emfs);
- g_signal_connect (emfs->emft, "folder-activated", G_CALLBACK (folder_activated_cb), emfs);
+ g_signal_connect (
+ emfs->emft, "folder-selected",
+ G_CALLBACK (folder_selected_cb), emfs);
+ g_signal_connect (
+ emfs->emft, "folder-activated",
+ G_CALLBACK (folder_activated_cb), emfs);
if (text != NULL) {
widget = gtk_label_new (text);
@@ -275,10 +292,17 @@ em_folder_selector_create_new (GtkWindow *parent,
w = gtk_label_new_with_mnemonic (_("Folder _name:"));
gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, FALSE, 6);
emfs->name_entry = (GtkEntry *) gtk_entry_new ();
- gtk_label_set_mnemonic_widget (GTK_LABEL (w), (GtkWidget *) emfs->name_entry);
- g_signal_connect (emfs->name_entry, "changed", G_CALLBACK (emfs_create_name_changed), emfs);
- g_signal_connect (emfs->name_entry, "activate", G_CALLBACK (emfs_create_name_activate), emfs);
- gtk_box_pack_start ((GtkBox *) hbox, (GtkWidget *) emfs->name_entry, TRUE, FALSE, 6);
+ gtk_label_set_mnemonic_widget (
+ GTK_LABEL (w), (GtkWidget *) emfs->name_entry);
+ g_signal_connect (
+ emfs->name_entry, "changed",
+ G_CALLBACK (emfs_create_name_changed), emfs);
+ g_signal_connect (
+ emfs->name_entry, "activate",
+ G_CALLBACK (emfs_create_name_activate), emfs);
+ gtk_box_pack_start (
+ (GtkBox *) hbox, (GtkWidget *) emfs->name_entry,
+ TRUE, FALSE, 6);
gtk_widget_show_all (hbox);
container = gtk_dialog_get_content_area (GTK_DIALOG (emfs));
@@ -332,7 +356,10 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
} else {
gchar *path;
- path = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name);
+ path = g_strdup_printf (
+ "%s/%s", (url->path == NULL ||
+ strcmp (url->path, "/") == 0) ? "":
+ url->path, name);
camel_url_set_path (url, path);
if (path[0] == '/') {
newpath = g_strdup (path+1);
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index b9b1173011..e24b7d329b 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -315,7 +315,10 @@ folder_tree_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
return;
}
} else {
- gint fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
+ gint fully_loaded;
+
+ fully_loaded =
+ ((m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) != 0);
do {
if (g_hash_table_lookup (si->full_hash, fi->full_name) == NULL) {
@@ -1787,7 +1790,11 @@ tree_drag_data_delete (GtkWidget *widget,
CamelStore *store;
GtkTreeIter iter;
- if (!priv->drag_row || (src_path = gtk_tree_row_reference_get_path (priv->drag_row)))
+ if (!priv->drag_row)
+ return;
+
+ src_path = gtk_tree_row_reference_get_path (priv->drag_row);
+ if (src_path == NULL)
return;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree));
@@ -2190,7 +2197,8 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
if (gtk_tree_path_compare (path, src_path) == 0
|| gtk_tree_path_is_descendant (path, src_path)
|| (gtk_tree_path_is_ancestor (path, src_path)
- && gtk_tree_path_get_depth (path) == gtk_tree_path_get_depth (src_path)-1)) {
+ && gtk_tree_path_get_depth (path) ==
+ gtk_tree_path_get_depth (src_path) - 1)) {
gtk_tree_path_free (src_path);
goto done;
}
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 60f03002f0..8ea58365f0 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -344,11 +344,14 @@ emfu_copy_folder_selected (EMailBackend *backend,
goto fail;
}
- if (!e_mail_folder_uri_parse (CAMEL_SESSION (session), uri, &tostore, &tobase, &local_error))
+ if (!e_mail_folder_uri_parse (
+ CAMEL_SESSION (session), uri,
+ &tostore, &tobase, &local_error))
tostore = NULL;
if (tostore != NULL)
- camel_service_connect_sync (CAMEL_SERVICE (tostore), &local_error);
+ camel_service_connect_sync (
+ CAMEL_SERVICE (tostore), &local_error);
if (local_error != NULL) {
e_mail_backend_submit_alert (
@@ -631,10 +634,14 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs,
session = em_folder_tree_get_session (folder_tree);
- if (!e_mail_folder_uri_parse (CAMEL_SESSION (session), uri, &store, NULL, &error)) {
- g_warning ("%s: Failed to parse folder uri: %s", G_STRFUNC, error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ e_mail_folder_uri_parse (
+ CAMEL_SESSION (session), uri, &store, NULL, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "%s: Failed to parse folder uri: %s",
+ G_STRFUNC, error->message);
+ g_error_free (error);
return;
}
diff --git a/mail/em-format-html-print.h b/mail/em-format-html-print.h
index 446f93fd78..c33669651d 100644
--- a/mail/em-format-html-print.h
+++ b/mail/em-format-html-print.h
@@ -49,8 +49,11 @@ typedef struct _EMFormatHTMLPrintClass EMFormatHTMLPrintClass;
struct _EMFormatHTMLPrint {
EMFormatHTML parent;
- GtkWidget *window; /* used to realise the gtkhtml in a toplevel, i dont know why */
- EMFormatHTML *source; /* used for print_message */
+ /* Used to realize the gtkhtml in a toplevel. */
+ GtkWidget *window;
+
+ /* Used for print_message. */
+ EMFormatHTML *source;
GtkPrintOperationAction action;
};
diff --git a/mail/em-utils.c b/mail/em-utils.c
index a9027e0fa2..c832c898c6 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -941,7 +941,9 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
GdkAtom target;
target = gtk_selection_data_get_target (data);
- gtk_selection_data_set (data, target, 8, (guchar *) uri_crlf, strlen (uri_crlf));
+ gtk_selection_data_set (
+ data, target, 8, (guchar *)
+ uri_crlf, strlen (uri_crlf));
g_free (uri_crlf);
}
@@ -2107,15 +2109,17 @@ em_utils_generate_account_hash (void)
if (account->id->address) {
EAccount *acnt;
- /* Accounts with identical email addresses that are enabled
- * take precedence over the accounts that aren't. If all
- * accounts with matching email addresses are disabled, then
- * the first one in the list takes precedence. The default
- * account always takes precedence no matter what.
- */
- acnt = g_hash_table_lookup (account_hash, account->id->address);
+ /* Accounts with identical email addresses that are
+ * enabled take precedence over the accounts that
+ * aren't. If all accounts with matching email
+ * addresses are disabled, then the first one in
+ * the list takes precedence. The default account
+ * always takes precedence no matter what. */
+ acnt = g_hash_table_lookup (
+ account_hash, account->id->address);
if (acnt && acnt != def && !acnt->enabled && account->enabled) {
- g_hash_table_remove (account_hash, acnt->id->address);
+ g_hash_table_remove (
+ account_hash, acnt->id->address);
acnt = NULL;
}
@@ -2131,9 +2135,13 @@ em_utils_generate_account_hash (void)
g_object_unref (iterator);
- /* The default account has to be there if none of the enabled accounts are present */
+ /* The default account has to be there if none
+ * of the enabled accounts are present. */
if (g_hash_table_size (account_hash) == 0 && def && def->id->address)
- g_hash_table_insert (account_hash, (gchar *) def->id->address, (gpointer) def);
+ g_hash_table_insert (
+ account_hash, (gchar *)
+ def->id->address,
+ (gpointer) def);
return account_hash;
}
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 803165b4ee..9c251027e3 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -133,8 +133,10 @@ mbox_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
session, _("Select folder"),
_("Select folder to import into"));
gtk_label_set_mnemonic_widget (label, w);
- em_folder_selection_button_set_selection ((EMFolderSelectionButton *) w, select_uri);
- folder_selected (EM_FOLDER_SELECTION_BUTTON (w), (EImportTargetURI *) target);
+ em_folder_selection_button_set_selection (
+ EM_FOLDER_SELECTION_BUTTON (w), select_uri);
+ folder_selected (
+ EM_FOLDER_SELECTION_BUTTON (w), (EImportTargetURI *) target);
g_signal_connect (w, "selected", G_CALLBACK(folder_selected), target);
gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, TRUE, 6);
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index e229978e33..fea9218e2e 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -268,9 +268,13 @@ pine_import_done (struct _pine_import_msg *m)
gconf = gconf_client_get_default ();
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-addr")))
- gconf_client_set_bool(gconf, "/apps/evolution/importer/pine/addr", TRUE, NULL);
+ gconf_client_set_bool (
+ gconf, "/apps/evolution/importer/pine/addr",
+ TRUE, NULL);
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-mail")))
- gconf_client_set_bool(gconf, "/apps/evolution/importer/pine/mail", TRUE, NULL);
+ gconf_client_set_bool (
+ gconf, "/apps/evolution/importer/pine/mail",
+ TRUE, NULL);
g_object_unref (gconf);
}
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 67906957bd..988c9fadcb 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -128,8 +128,8 @@ em_filter_folder_element_exec (struct _filter_mail_msg *m,
if (m->destination)
camel_folder_thaw (m->destination);
- /* this may thaw/unref source folders, do it here so we dont do it in the main thread
- see also fetch_mail_fetch () below */
+ /* this may thaw/unref source folders, do it here so we dont do
+ * it in the main thread see also fetch_mail_fetch () below */
g_object_unref (m->driver);
m->driver = NULL;
}
@@ -162,7 +162,7 @@ em_filter_folder_element_free (struct _filter_mail_msg *m)
static MailMsgInfo em_filter_folder_element_info = {
sizeof (struct _filter_mail_msg),
- (MailMsgDescFunc) em_filter_folder_element_desc, /* we do our own progress reporting? */
+ (MailMsgDescFunc) em_filter_folder_element_desc,
(MailMsgExecFunc) em_filter_folder_element_exec,
(MailMsgDoneFunc) em_filter_folder_element_done,
(MailMsgFreeFunc) em_filter_folder_element_free
@@ -270,10 +270,11 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
}
if (fm->delete && (!error || !*error)) {
- /* not keep on server - just delete all the actual messages on the server */
+ /* not keep on server - just delete all
+ * the actual messages on the server */
for (i=0;i<folder_uids->len;i++) {
- d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i]));
- camel_folder_delete_message (folder, folder_uids->pdata[i]);
+ camel_folder_delete_message (
+ folder, folder_uids->pdata[i]);
}
}
@@ -429,7 +430,11 @@ struct _send_queue_msg {
gpointer data;
};
-static void report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, gint pc, const gchar *desc, ...);
+static void report_status (struct _send_queue_msg *m,
+ enum camel_filter_status_t status,
+ gint pc,
+ const gchar *desc,
+ ...);
/* send 1 message to a specific transport */
static void
@@ -612,7 +617,10 @@ mail_send_message (struct _send_queue_msg *m,
g_string_append_printf (
err, _("Failed to append to %s: %s\n"
"Appending to local 'Sent' folder instead."),
- sent_folder_uri, local_error ? local_error->message : _("Unknown error"));
+ sent_folder_uri,
+ local_error ?
+ local_error->message :
+ _("Unknown error"));
if (local_error)
g_clear_error (&local_error);
}
@@ -709,7 +717,11 @@ exit:
/* ** SEND MAIL QUEUE ***************************************************** */
static void
-report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, gint pc, const gchar *desc, ...)
+report_status (struct _send_queue_msg *m,
+ enum camel_filter_status_t status,
+ gint pc,
+ const gchar *desc,
+ ...)
{
va_list ap;
gchar *str;
@@ -817,8 +829,12 @@ send_queue_exec (struct _send_queue_msg *m,
j += (send_uids->len - i);
if (j > 0)
- report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Failed to send %d of %d messages"), j, send_uids->len);
- else if (g_error_matches (m->base.error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ report_status (
+ m, CAMEL_FILTER_STATUS_END, 100,
+ _("Failed to send %d of %d messages"),
+ j, send_uids->len);
+ else if (g_error_matches (
+ m->base.error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Canceled."));
else
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Complete."));
@@ -875,7 +891,8 @@ static MailMsgInfo send_queue_info = {
(MailMsgFreeFunc) send_queue_free
};
-/* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */
+/* same interface as fetch_mail, just 'cause i'm lazy today
+ * (and we need to run it from the same spot?) */
void
mail_send_queue (EMailSession *session,
CamelFolder *queue,
@@ -928,8 +945,11 @@ struct _transfer_msg {
static gchar *
transfer_messages_desc (struct _transfer_msg *m)
{
- return g_strdup_printf (m->delete ? _("Moving messages to '%s'") : _("Copying messages to '%s'"),
- m->dest_uri);
+ return g_strdup_printf (
+ m->delete ?
+ _("Moving messages to '%s'") :
+ _("Copying messages to '%s'"),
+ m->dest_uri);
}
@@ -1083,7 +1103,9 @@ static MailMsgInfo sync_folder_info = {
};
void
-mail_sync_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
+mail_sync_folder (CamelFolder *folder,
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data)
{
struct _sync_folder_msg *m;
@@ -1157,7 +1179,10 @@ static MailMsgInfo sync_store_info = {
};
void
-mail_sync_store (CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data)
+mail_sync_store (CamelStore *store,
+ gint expunge,
+ void (*done) (CamelStore *store, gpointer data),
+ gpointer data)
{
struct _sync_store_msg *m;
@@ -1176,7 +1201,9 @@ mail_sync_store (CamelStore *store, gint expunge, void (*done) (CamelStore *stor
static gchar *
refresh_folder_desc (struct _sync_folder_msg *m)
{
- return g_strdup_printf (_("Refreshing folder '%s'"), camel_folder_get_full_name (m->folder));
+ return g_strdup_printf (
+ _("Refreshing folder '%s'"),
+ camel_folder_get_full_name (m->folder));
}
static void
@@ -1198,7 +1225,9 @@ static MailMsgInfo refresh_folder_info = {
};
void
-mail_refresh_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
+mail_refresh_folder (CamelFolder *folder,
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data)
{
struct _sync_folder_msg *m;
@@ -1226,10 +1255,14 @@ folder_is_from_source_uid (CamelFolder *folder,
return (g_strcmp0 (uid, source_uid) == 0);
}
-/* This is because pop3 accounts are hidden under local Inbox, thus whenever an expunge
- is done on a local trash or Inbox, then also all active pop3 accounts should be expunged. */
+/* This is because pop3 accounts are hidden under local Inbox,
+ * thus whenever an expunge is done on a local trash or Inbox,
+ * then also all active pop3 accounts should be expunged. */
static void
-expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable *cancellable, GError **error)
+expunge_pop3_stores (CamelFolder *expunging,
+ EMailSession *session,
+ GCancellable *cancellable,
+ GError **error)
{
GPtrArray *uids;
CamelFolder *folder;
@@ -1243,7 +1276,10 @@ expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable
return;
for (i = 0; i < uids->len; i++) {
- CamelMessageInfo *info = camel_folder_get_message_info (expunging, uids->pdata[i]);
+ CamelMessageInfo *info;
+
+ info = camel_folder_get_message_info (
+ expunging, uids->pdata[i]);
if (!info)
continue;
@@ -1252,19 +1288,31 @@ expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable
CamelMimeMessage *msg;
GError *local_error = NULL;
- /* because the UID in the local store doesn't match with the UID in the pop3 store */
- msg = camel_folder_get_message_sync (expunging, uids->pdata[i], cancellable, &local_error);
+ /* because the UID in the local store doesn't
+ * match with the UID in the pop3 store */
+ msg = camel_folder_get_message_sync (
+ expunging, uids->pdata[i],
+ cancellable, &local_error);
if (msg) {
const gchar *pop3_uid;
- pop3_uid = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-POP3-UID");
+ pop3_uid = camel_medium_get_header (
+ CAMEL_MEDIUM (msg),
+ "X-Evolution-POP3-UID");
if (pop3_uid) {
- gchar *duped = g_strstrip (g_strdup (pop3_uid));
+ gchar *duped;
+
+ duped = g_strstrip (g_strdup (pop3_uid));
if (!expunging_uids)
- expunging_uids = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ expunging_uids = g_hash_table_new_full (
+ g_str_hash, g_str_equal,
+
+ g_free, g_free);
- g_hash_table_insert (expunging_uids, duped, g_strdup (camel_mime_message_get_source (msg)));
+ g_hash_table_insert (
+ expunging_uids, duped,
+ g_strdup (camel_mime_message_get_source (msg)));
}
g_object_unref (msg);
@@ -1288,7 +1336,9 @@ expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable
e_iterator_next (iter)) {
account = (EAccount *) e_iterator_get (iter);
- if (account->enabled && account->source && account->source->url && g_str_has_prefix (account->source->url, "pop://")) {
+ if (account->enabled &&
+ account->source && account->source->url &&
+ g_str_has_prefix (account->source->url, "pop://")) {
gboolean any_found = FALSE;
folder = e_mail_session_get_inbox_sync (
@@ -1299,7 +1349,8 @@ expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable
uids = camel_folder_get_uids (folder);
if (uids) {
for (i = 0; i < uids->len; i++) {
- /* ensure the ID is from this account, as it's generated by evolution */
+ /* ensure the ID is from this account,
+ * as it's generated by evolution */
const gchar *source_uid;
source_uid = g_hash_table_lookup (
@@ -1328,7 +1379,9 @@ expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable
static gchar *
expunge_folder_desc (struct _sync_folder_msg *m)
{
- return g_strdup_printf (_("Expunging folder '%s'"), camel_folder_get_full_name (m->folder));
+ return g_strdup_printf (
+ _("Expunging folder '%s'"),
+ camel_folder_get_full_name (m->folder));
}
static void
@@ -1336,9 +1389,11 @@ expunge_folder_exec (struct _sync_folder_msg *m,
GCancellable *cancellable,
GError **error)
{
- gboolean is_local_inbox_or_trash = m->folder == e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_INBOX);
+ gboolean is_local_inbox_or_trash =
+ m->folder == e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_INBOX);
- if (!is_local_inbox_or_trash && e_mail_local_get_store () == camel_folder_get_parent_store (m->folder)) {
+ if (!is_local_inbox_or_trash && e_mail_local_get_store () ==
+ camel_folder_get_parent_store (m->folder)) {
CamelFolder *trash;
trash = e_mail_session_get_trash_sync (
@@ -1367,7 +1422,10 @@ static MailMsgInfo expunge_folder_info = {
};
void
-mail_expunge_folder (EMailSession *session, CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
+mail_expunge_folder (EMailSession *session,
+ CamelFolder *folder,
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data)
{
struct _sync_folder_msg *m;
@@ -1466,10 +1524,13 @@ mail_empty_trash (EMailSession *session,
mail_msg_slow_ordered_push (m);
}
-/* ** Execute Shell Command ***************************************************** */
+/* ** Execute Shell Command ************************************************ */
void
-mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data)
+mail_execute_shell_command (CamelFilterDriver *driver,
+ gint argc,
+ gchar **argv,
+ gpointer data)
{
if (argc <= 0)
return;
@@ -1477,7 +1538,7 @@ mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv,
g_spawn_async (NULL, argv, NULL, 0, NULL, data, NULL, NULL);
}
-/* ---------------------------------------------------------------------------------- */
+/* ------------------------------------------------------------------------- */
struct _disconnect_msg {
MailMsg base;
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index a6eb037520..dc3c9ed7ee 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -954,7 +954,9 @@ refresh_folders_exec (struct _refresh_folders_msg *m,
gulong handler_id = 0;
if (cancellable)
- handler_id = g_signal_connect (m->info->cancellable, "cancelled", G_CALLBACK (main_op_cancelled_cb), cancellable);
+ handler_id = g_signal_connect (
+ m->info->cancellable, "cancelled",
+ G_CALLBACK (main_op_cancelled_cb), cancellable);
get_folders (m->store, m->folders, m->finfo);
@@ -978,7 +980,9 @@ refresh_folders_exec (struct _refresh_folders_msg *m,
break;
if (m->info->state != SEND_CANCELLED)
- g_signal_emit_by_name (m->info->cancellable, "status", _("Updating..."), 100 * i / m->folders->len);
+ g_signal_emit_by_name (
+ m->info->cancellable, "status",
+ _("Updating..."), 100 * i / m->folders->len);
}
if (cancellable)
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 107a3ac9ed..7e4441a8de 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -150,9 +150,9 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
if (strlen (subject) < max_subject_length) {
fwd_subj = g_strdup_printf ("[Fwd: %s]", subject);
} else {
- /* We can't use %.*s because it depends on the locale being C/POSIX
- or UTF-8 to work correctly in glibc */
- /*fwd_subj = g_strdup_printf ("[Fwd: %.*s...]", max_subject_length, subject);*/
+ /* We can't use %.*s because it depends on the
+ * locale being C/POSIX or UTF-8 to work correctly
+ * in glibc. */
fwd_subj = g_malloc (max_subject_length + 11);
memcpy (fwd_subj, "[Fwd: ", 6);
memcpy (fwd_subj + 6, subject, max_subject_length);
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index de39ca53cd..e726433897 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -467,22 +467,26 @@ mail_vfolder_add_folder (EMailSession *session,
if (remote) {
if ((link = mv_find_folder (source_folders_remote, session, uri)) != NULL) {
g_free (link->data);
- source_folders_remote = g_list_remove_link (source_folders_remote, link);
+ source_folders_remote = g_list_remove_link (
+ source_folders_remote, link);
}
} else {
if ((link = mv_find_folder (source_folders_local, session, uri)) != NULL) {
g_free (link->data);
- source_folders_local = g_list_remove_link (source_folders_local, link);
+ source_folders_local = g_list_remove_link (
+ source_folders_local, link);
}
}
} else if (!is_ignore) {
/* we ignore drafts/sent/outbox here */
if (remote) {
if (mv_find_folder (source_folders_remote, session, uri) == NULL)
- source_folders_remote = g_list_prepend (source_folders_remote, g_strdup (uri));
+ source_folders_remote = g_list_prepend (
+ source_folders_remote, g_strdup (uri));
} else {
if (mv_find_folder (source_folders_local, session, uri) == NULL)
- source_folders_local = g_list_prepend (source_folders_local, g_strdup (uri));
+ source_folders_local = g_list_prepend (
+ source_folders_local, g_strdup (uri));
}
}
@@ -1115,8 +1119,12 @@ vfolder_load_storage (EMailBackend *backend)
g_free (xmlfile);
g_free (user);
- g_signal_connect(context, "rule_added", G_CALLBACK(context_rule_added), context);
- g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
+ g_signal_connect (
+ context, "rule_added",
+ G_CALLBACK (context_rule_added), context);
+ g_signal_connect (
+ context, "rule_removed",
+ G_CALLBACK (context_rule_removed), context);
/* load store to mail component */
e_mail_store_add (session, vfolder_store, _("Search Folders"));
@@ -1299,7 +1307,8 @@ new_rule_clicked (GtkWidget *w, gint button, gpointer data)
return;
}
- if (e_rule_context_find_rule ((ERuleContext *) context, rule->name, rule->source)) {
+ if (e_rule_context_find_rule (
+ (ERuleContext *) context, rule->name, rule->source)) {
e_alert_run_dialog_for_args (
GTK_WINDOW (w), "mail:vfolder-notunique",
rule->name, NULL);
@@ -1323,7 +1332,8 @@ new_rule_changed_cb (EFilterRule *rule, GtkDialog *dialog)
g_return_if_fail (rule != NULL);
g_return_if_fail (dialog != NULL);
- gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, rule->parts != NULL);
+ gtk_dialog_set_response_sensitive (
+ dialog, GTK_RESPONSE_OK, rule->parts != NULL);
}
EFilterPart *