aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-backend.c3
-rw-r--r--mail/e-mail-display.c14
-rw-r--r--mail/e-mail-paned-view.c4
-rw-r--r--mail/e-mail-reader.c16
-rw-r--r--mail/e-mail-session.c17
-rw-r--r--mail/e-mail-store.c18
-rw-r--r--mail/em-config.c2
-rw-r--r--mail/em-folder-selection-button.c1
-rw-r--r--mail/em-folder-tree.c3
-rw-r--r--mail/em-folder-utils.c51
-rw-r--r--mail/em-format-html.c14
-rw-r--r--mail/em-format-html.h16
-rw-r--r--mail/em-utils.c13
-rw-r--r--mail/em-vfolder-rule.c7
-rw-r--r--mail/importers/mail-importer.c12
-rw-r--r--mail/mail-folder-cache.c18
-rw-r--r--mail/mail-send-recv.c21
-rw-r--r--mail/mail-vfolder.c13
18 files changed, 168 insertions, 75 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 86ffc92ef0..3addb64011 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -125,7 +125,8 @@ mail_backend_prepare_for_offline_cb (EShell *shell,
window = e_shell_get_active_window (shell);
session = e_mail_backend_get_session (backend);
- if (e_shell_get_network_available (shell) && e_shell_backend_is_started (E_SHELL_BACKEND (backend)))
+ if (e_shell_get_network_available (shell) &&
+ e_shell_backend_is_started (E_SHELL_BACKEND (backend)))
synchronize = em_utils_prompt_user (
window, NULL, "mail:ask-quick-offline", NULL);
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 55f31c7156..78a63248bc 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -290,10 +290,18 @@ mail_display_link_clicked (GtkHTML *html,
else
flags &= ~EM_FORMAT_HTML_HEADER_BCC;
} else if (strcmp (uri, "##HEADERS##") == 0) {
- if (em_format_html_get_headers_state (priv->formatter) == EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED)
- em_format_html_set_headers_state (priv->formatter, EM_FORMAT_HTML_HEADERS_STATE_EXPANDED);
+ EMFormatHTMLHeadersState state;
+
+ state = em_format_html_get_headers_state (
+ priv->formatter);
+
+ if (state == EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED)
+ state = EM_FORMAT_HTML_HEADERS_STATE_EXPANDED;
else
- em_format_html_set_headers_state (priv->formatter, EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED);
+ state = EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED;
+
+ em_format_html_set_headers_state (
+ priv->formatter, state);
}
priv->formatter->header_wrap_flags = flags;
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 589b522603..8c79a824df 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -795,7 +795,9 @@ mail_paned_view_update_view_instance (EMailView *view)
em_utils_folder_is_sent (folder);
if (e_shell_settings_get_boolean (shell_settings, "mail-global-view-setting"))
- view_instance = e_shell_view_new_view_instance (shell_view, outgoing_folder ? "global_view_sent_setting" : "global_view_setting");
+ view_instance = e_shell_view_new_view_instance (
+ shell_view, outgoing_folder ?
+ "global_view_sent_setting" : "global_view_setting");
else
view_instance = e_shell_view_new_view_instance (shell_view, view_id);
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 6ef8ec2e29..dc163bda06 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -627,6 +627,7 @@ static void
check_close_browser_reader (EMailReader *reader)
{
GConfClient *client;
+ const gchar *key;
gchar *value;
gboolean close_it = FALSE;
@@ -636,8 +637,8 @@ check_close_browser_reader (EMailReader *reader)
client = gconf_client_get_default ();
- value = gconf_client_get_string (
- client, "/apps/evolution/mail/prompts/reply_close_browser", NULL);
+ key = "/apps/evolution/mail/prompts/reply_close_browser";
+ value = gconf_client_get_string (client, key, NULL);
if (value && g_str_equal (value, "always")) {
close_it = TRUE;
@@ -665,10 +666,10 @@ check_close_browser_reader (EMailReader *reader)
close_it = response == GTK_RESPONSE_YES || response == GTK_RESPONSE_OK;
- if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_CANCEL)
- gconf_client_set_string (
- client, "/apps/evolution/mail/prompts/reply_close_browser",
- response == GTK_RESPONSE_OK ? "always" : "never", NULL);
+ if (response == GTK_RESPONSE_OK)
+ gconf_client_set_string (client, key, "always", NULL);
+ else if (response == GTK_RESPONSE_CANCEL)
+ gconf_client_set_string (client, key, "never", NULL);
}
g_free (value);
@@ -1441,7 +1442,8 @@ action_mail_reply_sender_check (CamelFolder *folder,
type = E_MAIL_REPLY_TO_ALL;
else if (response == GTK_RESPONSE_OK)
type = E_MAIL_REPLY_TO_LIST;
- else if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) {
+ else if (response == GTK_RESPONSE_CANCEL ||
+ response == GTK_RESPONSE_DELETE_EVENT) {
g_object_unref (message);
goto exit;
}
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index f8ca413c08..43670a3e93 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -638,20 +638,27 @@ mail_session_get_password (CamelSession *session,
remember = config_service?config_service->save_passwd:FALSE;
- if (!config_service || (config_service && !config_service->get_password_canceled)) {
+ if (!config_service || (config_service &&
+ !config_service->get_password_canceled)) {
guint32 eflags;
gchar *title;
if (flags & CAMEL_SESSION_PASSPHRASE) {
if (account)
- title = g_strdup_printf (_("Enter Passphrase for %s"), account->name);
+ title = g_strdup_printf (
+ _("Enter Passphrase for %s"),
+ account->name);
else
- title = g_strdup (_("Enter Passphrase"));
+ title = g_strdup (
+ _("Enter Passphrase"));
} else {
if (account)
- title = g_strdup_printf (_("Enter Password for %s"), account->name);
+ title = g_strdup_printf (
+ _("Enter Password for %s"),
+ account->name);
else
- title = g_strdup (_("Enter Password"));
+ title = g_strdup (
+ _("Enter Password"));
}
if ((flags & CAMEL_SESSION_PASSWORD_STATIC) != 0)
eflags = E_PASSWORDS_REMEMBER_NEVER;
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index 6313640f93..214efb0bb3 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -248,7 +248,8 @@ mail_store_load_accounts (EMailSession *session,
if (!account->enabled)
continue;
- /* Do not add local-delivery files, but make them ready for later use. */
+ /* Do not add local-delivery files,
+ * but make them ready for later use. */
url = camel_url_new (account->source->url, NULL);
if (url != NULL) {
skip = em_utils_is_local_delivery_mbox_file (url);
@@ -258,10 +259,17 @@ mail_store_load_accounts (EMailSession *session,
if (skip) {
GError *error = NULL;
- if (!camel_session_add_service (CAMEL_SESSION (session), account->uid, account->source->url, CAMEL_PROVIDER_STORE, &error)) {
- g_warning ("%s: Failed to add '%s' as store: %s", G_STRFUNC, account->source->url, error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ camel_session_add_service (
+ CAMEL_SESSION (session),
+ account->uid, account->source->url,
+ CAMEL_PROVIDER_STORE, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "Failed to add '%s' as store: %s",
+ account->source->url,
+ error->message);
+ g_error_free (error);
}
} else {
e_mail_store_add_by_account (session, account);
diff --git a/mail/em-config.c b/mail/em-config.c
index e6ed1d5b3b..53728b8e66 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -84,7 +84,7 @@ em_config_set_target (EConfig *ep,
config->priv->account_changed_id = g_signal_connect (
s->modified_account, "changed",
- G_CALLBACK(emp_account_changed), ep);
+ G_CALLBACK (emp_account_changed), ep);
break; }
}
}
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 44da01f912..9ca3267e4c 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -249,7 +249,6 @@ folder_selection_button_clicked (GtkButton *button)
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK)
goto exit;
-
uri = em_folder_selector_get_selected_uri (
EM_FOLDER_SELECTOR (dialog));
em_folder_selection_button_set_selection (
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 95aa6b81c6..794586399c 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1826,7 +1826,8 @@ tree_drag_data_get (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 || !(src_path =
+ gtk_tree_row_reference_get_path (priv->drag_row)))
return;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree));
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index c64972d57f..89f382da9b 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -68,7 +68,11 @@
static gboolean
emfu_is_special_local_folder (const gchar *name)
{
- return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates"));
+ return (!strcmp (name, "Drafts") ||
+ !strcmp (name, "Inbox") ||
+ !strcmp (name, "Outbox") ||
+ !strcmp (name, "Sent") ||
+ !strcmp (name, "Templates"));
}
struct _EMCopyFolders {
@@ -153,8 +157,10 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
d(printf ("Copying from '%s' to '%s'\n", info->full_name, toname->str));
- /* This makes sure we create the same tree, e.g. from a nonselectable source */
- /* Not sure if this is really the 'right thing', e.g. for spool stores, but it makes the ui work */
+ /* This makes sure we create the same tree,
+ * e.g. from a nonselectable source. */
+ /* Not sure if this is really the 'right thing',
+ * e.g. for spool stores, but it makes the ui work. */
if ((info->flags & CAMEL_FOLDER_NOSELECT) == 0) {
d(printf ("this folder is selectable\n"));
if (m->tostore == m->fromstore && m->delete) {
@@ -218,7 +224,8 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
}
}
- /* delete the folders in reverse order from how we copyied them, if we are deleting any */
+ /* Delete the folders in reverse order from how we copied them,
+ * if we are deleting any. */
l = deleting;
while (l) {
CamelFolderInfo *info = l->data;
@@ -265,7 +272,11 @@ static MailMsgInfo copy_folders_info = {
};
gint
-em_folder_utils_copy_folders (CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, gint delete)
+em_folder_utils_copy_folders (CamelStore *fromstore,
+ const gchar *frombase,
+ CamelStore *tostore,
+ const gchar *tobase,
+ gint delete)
{
struct _EMCopyFolders *m;
gint seq;
@@ -541,7 +552,9 @@ em_folder_utils_delete_folder (EMailBackend *backend,
return;
}
- if (mail_folder_cache_get_folder_info_flags (folder_cache, folder, &flags) && (flags & CAMEL_FOLDER_SYSTEM)) {
+ if (mail_folder_cache_get_folder_info_flags (
+ folder_cache, folder, &flags) &&
+ (flags & CAMEL_FOLDER_SYSTEM)) {
e_mail_backend_submit_alert (
backend, "mail:no-delete-special-folder",
camel_folder_get_display_name (folder), NULL);
@@ -550,7 +563,9 @@ em_folder_utils_delete_folder (EMailBackend *backend,
g_object_ref (folder);
- if (mail_folder_cache_get_folder_info_flags (folder_cache, folder, &flags) && (flags & CAMEL_FOLDER_CHILDREN)) {
+ if (mail_folder_cache_get_folder_info_flags (
+ folder_cache, folder, &flags) &&
+ (flags & CAMEL_FOLDER_CHILDREN)) {
if (parent_store && CAMEL_IS_VEE_STORE (parent_store))
dialog = e_alert_dialog_new_for_args (
parent, "mail:ask-delete-vfolder",
@@ -559,8 +574,7 @@ em_folder_utils_delete_folder (EMailBackend *backend,
dialog = e_alert_dialog_new_for_args (
parent, "mail:ask-delete-folder",
full_name, NULL);
- }
- else {
+ } else {
if (parent_store && CAMEL_IS_VEE_STORE (parent_store))
dialog = e_alert_dialog_new_for_args (
parent, "mail:ask-delete-vfolder-nochild",
@@ -658,7 +672,11 @@ static MailMsgInfo create_folder_info = {
};
static gint
-emfu_create_folder_real (CamelStore *store, const gchar *full_name, void (* done) (CamelFolderInfo *fi, gpointer user_data), gpointer user_data)
+emfu_create_folder_real (CamelStore *store,
+ const gchar *full_name,
+ void (*done) (CamelFolderInfo *fi,
+ gpointer user_data),
+ gpointer user_data)
{
gchar *name, *namebuf = NULL;
struct _EMCreateFolder *m;
@@ -692,13 +710,18 @@ emfu_create_folder_real (CamelStore *store, const gchar *full_name, void (* done
}
static void
-new_folder_created_cb (CamelFolderInfo *fi, gpointer user_data)
+new_folder_created_cb (CamelFolderInfo *fi,
+ gpointer user_data)
{
struct _EMCreateFolderTempData *emcftd=user_data;
if (fi) {
/* Exapnding newly created folder */
if (emcftd->emft)
- em_folder_tree_set_selected ((EMFolderTree *) emcftd->emft, emcftd->uri, GPOINTER_TO_INT(g_object_get_data ((GObject *)emcftd->emft, "select")) ? FALSE : TRUE);
+ em_folder_tree_set_selected (
+ EM_FOLDER_TREE (emcftd->emft),
+ emcftd->uri, GPOINTER_TO_INT (
+ g_object_get_data (G_OBJECT (emcftd->emft),
+ "select")) ? FALSE : TRUE);
gtk_widget_destroy ((GtkWidget *) emcftd->emfs);
}
@@ -759,7 +782,8 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs,
gtk_widget_destroy ((GtkWidget *)emfs);
} else {
/* Temp data to pass to create_folder_real function */
- emcftd = (struct _EMCreateFolderTempData *) g_malloc (sizeof (struct _EMCreateFolderTempData));
+ emcftd = (struct _EMCreateFolderTempData *)
+ g_malloc (sizeof (struct _EMCreateFolderTempData));
emcftd->emfs = emfs;
emcftd->uri = g_strdup (uri);
emcftd->emft = folder_tree;
@@ -770,7 +794,6 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs,
}
}
-
/* FIXME: these functions must be documented */
void
em_folder_utils_create_folder (GtkWindow *parent,
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 363be9afe7..6103f25e40 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -2817,9 +2817,9 @@ efh_format_headers (EMFormatHTML *efh,
g_string_free (tmp, TRUE);
} else if (!g_ascii_strcasecmp (header->name, "Subject")) {
gchar *buf = NULL;
- buf = camel_header_unfold (header->value);
- subject = camel_header_decode_string (buf, hdr_charset);
- g_free (buf);
+ buf = camel_header_unfold (header->value);
+ subject = camel_header_decode_string (buf, hdr_charset);
+ g_free (buf);
}
header = header->next;
}
@@ -2909,12 +2909,12 @@ efh_format_headers (EMFormatHTML *efh,
} else {
if (efh->priv->headers_collapsable)
camel_stream_printf (stream, "<tr><td valign=\"top\" width=\"20\"><a href=\"##HEADERS##\"><img src=\"%s/minus.png\"></a></td><td><table border=0 cellpadding=\"0\">\n",
- evolution_imagesdir);
- else
+ evolution_imagesdir);
+ else
camel_stream_printf (stream, "<tr><td><table border=0 cellpadding=\"0\">\n");
- }
+ }
- g_free (evolution_imagesdir);
+ g_free (evolution_imagesdir);
/* dump selected headers */
if (emf->mode == EM_FORMAT_MODE_ALLHEADERS) {
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index 4e62cb7e37..37eace367f 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -133,7 +133,10 @@ struct _EMFormatHTMLJob {
/* Pending object (classid: url) */
typedef struct _EMFormatHTMLPObject EMFormatHTMLPObject;
-typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
+typedef gboolean
+ (*EMFormatHTMLPObjectFunc) (EMFormatHTML *md,
+ GtkHTMLEmbedded *eb,
+ EMFormatHTMLPObject *pobject);
/**
* struct _EMFormatHTMLPObject - Pending object.
@@ -162,11 +165,16 @@ struct _EMFormatHTMLPObject {
};
#define EM_FORMAT_HTML_HEADER_NOCOLUMNS (EM_FORMAT_HEADER_LAST)
-#define EM_FORMAT_HTML_HEADER_HTML (EM_FORMAT_HEADER_LAST<<1) /* header already in html format */
-#define EM_FORMAT_HTML_HEADER_NODEC (EM_FORMAT_HEADER_LAST<<2) /* header already in html format */
+
+/* header already in html format */
+#define EM_FORMAT_HTML_HEADER_HTML (EM_FORMAT_HEADER_LAST<<1)
+#define EM_FORMAT_HTML_HEADER_NODEC (EM_FORMAT_HEADER_LAST<<2)
+
#define EM_FORMAT_HTML_HEADER_LAST (EM_FORMAT_HEADER_LAST<<8)
-#define EM_FORMAT_HTML_VPAD "<table cellspacing=0 cellpadding=3><tr><td><a name=\"padding\"></a></td></tr></table>\n"
+#define EM_FORMAT_HTML_VPAD \
+ "<table cellspacing=0 cellpadding=3><tr><td>" \
+ "<a name=\"padding\"></a></td></tr></table>\n"
/**
* struct _EMFormatHTML - HTML formatter object.
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 2bc8831ad4..aef894a9e1 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1325,7 +1325,8 @@ em_utils_message_to_html (CamelMimeMessage *message,
GConfClient *gconf;
gchar *charset;
- /* FIXME: we should be getting this from the current view, not the global setting. */
+ /* FIXME We should be getting this from the
+ * current view, not the global setting. */
gconf = gconf_client_get_default ();
charset = gconf_client_get_string (
gconf, "/apps/evolution/mail/display/charset", NULL);
@@ -1633,7 +1634,8 @@ search_address_in_addressbooks (const gchar *address,
query = e_book_query_field_test (E_CONTACT_EMAIL, E_BOOK_QUERY_IS, address);
- for (g = e_source_list_peek_groups (emu_books_source_list); g; g = g_slist_next (g)) {
+ for (g = e_source_list_peek_groups (emu_books_source_list);
+ g; g = g_slist_next (g)) {
ESourceGroup *group = g->data;
if (!group)
@@ -1738,7 +1740,8 @@ search_address_in_addressbooks (const gchar *address,
g_list_free (contacts);
}
} else if (book) {
- stop = stop || (err && g_error_matches (err, E_BOOK_ERROR, E_BOOK_ERROR_CANCELLED));
+ stop = stop || (err && g_error_matches (
+ err, E_BOOK_ERROR, E_BOOK_ERROR_CANCELLED));
if (err && !stop) {
gchar *source_uid = g_strdup (e_source_peek_uid (source));
@@ -1760,7 +1763,9 @@ search_address_in_addressbooks (const gchar *address,
if (stop && !cached_book && book) {
g_object_unref (book);
} else if (!stop && book && !cached_book) {
- g_hash_table_insert (emu_books_hash, g_strdup (e_source_peek_uid (source)), book);
+ g_hash_table_insert (
+ emu_books_hash, g_strdup (
+ e_source_peek_uid (source)), book);
}
}
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 2abd99ef9e..c144cbd799 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -648,7 +648,9 @@ source_remove (GtkWidget *widget, struct _source_data *data)
gtk_tree_path_free (path);
gtk_tree_selection_select_iter (selection, &iter);
- gtk_tree_model_get (GTK_TREE_MODEL (data->model), &iter, 0, &data->current, -1);
+ gtk_tree_model_get (
+ GTK_TREE_MODEL (data->model), &iter,
+ 0, &data->current, -1);
} else {
data->current = NULL;
}
@@ -691,7 +693,8 @@ get_widget (EFilterRule *fr, ERuleContext *rc)
g_object_set_data_full((GObject *)frame, "data", data, g_free);
for (i = 0; i < BUTTON_LAST; i++) {
- data->buttons[i] =(GtkButton *)e_builder_get_widget (builder, edit_buttons[i].name);
+ data->buttons[i] =(GtkButton *)
+ e_builder_get_widget (builder, edit_buttons[i].name);
g_signal_connect(data->buttons[i], "clicked", edit_buttons[i].func, data);
}
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index f6cbbbb82c..f8edee6dac 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -118,7 +118,9 @@ import_mbox_exec (struct _import_mbox_msg *m,
CamelMessageInfo *info;
if (g_stat (m->path, &st) == -1) {
- g_warning("cannot find source file to import '%s': %s", m->path, g_strerror(errno));
+ g_warning (
+ "cannot find source file to import '%s': %s",
+ m->path, g_strerror (errno));
return;
}
@@ -135,7 +137,9 @@ import_mbox_exec (struct _import_mbox_msg *m,
if (S_ISREG (st.st_mode)) {
fd = g_open (m->path, O_RDONLY|O_BINARY, 0);
if (fd == -1) {
- g_warning("cannot find source file to import '%s': %s", m->path, g_strerror(errno));
+ g_warning (
+ "cannot find source file to import '%s': %s",
+ m->path, g_strerror (errno));
goto fail1;
}
@@ -157,7 +161,9 @@ import_mbox_exec (struct _import_mbox_msg *m,
guint32 flags = 0;
if (st.st_size > 0)
- pc = (gint)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size));
+ pc = (gint) (100.0 * ((gdouble)
+ camel_mime_parser_tell (mp) /
+ (gdouble) st.st_size));
camel_operation_progress (cancellable, pc);
msg = camel_mime_message_new ();
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 7edefd3782..1068f3600f 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -153,16 +153,24 @@ flush_updates_idle_cb (MailFolderCache *self)
if (up->remove) {
if (up->delete) {
- g_signal_emit (self, signals[FOLDER_DELETED], 0, up->store, up->full_name);
+ g_signal_emit (
+ self, signals[FOLDER_DELETED], 0,
+ up->store, up->full_name);
} else
- g_signal_emit (self, signals[FOLDER_UNAVAILABLE], 0, up->store, up->full_name);
+ g_signal_emit (
+ self, signals[FOLDER_UNAVAILABLE], 0,
+ up->store, up->full_name);
} else {
if (up->oldfull && up->add) {
- g_signal_emit (self, signals[FOLDER_RENAMED], 0, up->store, up->oldfull, up->full_name);
+ g_signal_emit (
+ self, signals[FOLDER_RENAMED], 0,
+ up->store, up->oldfull, up->full_name);
}
if (!up->oldfull && up->add)
- g_signal_emit (self, signals[FOLDER_AVAILABLE], 0, up->store, up->full_name);
+ g_signal_emit (
+ self, signals[FOLDER_AVAILABLE], 0,
+ up->store, up->full_name);
}
/* update unread counts */
@@ -588,8 +596,6 @@ rename_folders (MailFolderCache *self,
old = g_strdup_printf("%s%s", oldbase, fi->full_name + strlen(newbase));
mfi = g_hash_table_lookup (si->folders, old);
if (mfi) {
- d(printf("Found old folder '%s' renaming to '%s'\n", mfi->full_name, fi->full_name));
-
up->oldfull = mfi->full_name;
/* Its a rename op */
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 7bc8384802..71037cb5b2 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -69,7 +69,10 @@ struct _folder_info {
gchar *uri;
CamelFolder *folder;
time_t update;
- gint count; /* how many times updated, to slow it down as we go, if we have lots */
+
+ /* How many times updated, to slow it
+ * down as we go, if we have lots. */
+ gint count;
};
struct _send_data {
@@ -78,7 +81,9 @@ struct _send_data {
GtkDialog *gd;
gint cancelled;
- CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */
+ /* Since we're never asked to update
+ * this one, do it ourselves. */
+ CamelFolder *inbox;
time_t inbox_update;
GMutex *lock;
@@ -544,7 +549,8 @@ build_dialog (GtkWindow *parent,
info->keep_on_server = source->keep_on_server;
info->cancellable = camel_operation_new ();
info->state = allow_send ? SEND_ACTIVE : SEND_COMPLETE;
- info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
+ info->timeout_id = g_timeout_add (
+ STATUS_TIMEOUT, operation_status_timeout, info);
g_signal_connect (
info->cancellable, "status",
@@ -558,7 +564,8 @@ build_dialog (GtkWindow *parent,
e_iterator_next (iter);
continue;
} else if (info->timeout_id == 0)
- info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
+ info->timeout_id = g_timeout_add (
+ STATUS_TIMEOUT, operation_status_timeout, info);
recv_icon = gtk_image_new_from_icon_name (
"mail-inbox", GTK_ICON_SIZE_LARGE_TOOLBAR);
@@ -640,7 +647,8 @@ build_dialog (GtkWindow *parent,
info->keep_on_server = FALSE;
info->cancellable = camel_operation_new ();
info->state = SEND_ACTIVE;
- info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
+ info->timeout_id = g_timeout_add (
+ STATUS_TIMEOUT, operation_status_timeout, info);
g_free (transport_uid);
@@ -651,7 +659,8 @@ build_dialog (GtkWindow *parent,
g_hash_table_insert (data->active, (gpointer) SEND_URI_KEY, info);
list = g_list_prepend (list, info);
} else if (info->timeout_id == 0)
- info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
+ info->timeout_id = g_timeout_add (
+ STATUS_TIMEOUT, operation_status_timeout, info);
send_icon = gtk_image_new_from_icon_name (
"mail-outbox", GTK_ICON_SIZE_LARGE_TOOLBAR);
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index b867bf485b..67e3d0752a 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -501,9 +501,12 @@ mail_vfolder_add_folder (EMailSession *session,
* they must be explictly listed as a source. */
if (rule->source
&& !is_ignore
- && ((((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL && !remote)
- || (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE && remote)
- || (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)))
+ && ((((EMVFolderRule *)rule)->with ==
+ EM_VFOLDER_RULE_WITH_LOCAL && !remote)
+ || (((EMVFolderRule *)rule)->with ==
+ EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE && remote)
+ || (((EMVFolderRule *)rule)->with ==
+ EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)))
found = TRUE;
source = NULL;
@@ -938,7 +941,9 @@ store_folder_deleted_cb (CamelStore *store,
0, 0, NULL, context_rule_removed, context);
e_rule_context_remove_rule ((ERuleContext *)context, rule);
g_object_unref (rule);
- g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
+ g_signal_connect (
+ context, "rule_removed",
+ G_CALLBACK (context_rule_removed), context);
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);