aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/elm-importer.c4
-rw-r--r--mail/importers/evolution-mbox-importer.c37
-rw-r--r--mail/importers/mail-importer.c11
3 files changed, 36 insertions, 16 deletions
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
index 0bf58a7b73..75cf996e14 100644
--- a/mail/importers/elm-importer.c
+++ b/mail/importers/elm-importer.c
@@ -271,7 +271,9 @@ elm_status_timeout (gpointer data)
pc = importer->status_pc;
g_mutex_unlock (importer->status_lock);
- e_import_status (importer->import, (EImportTarget *) importer->target, what, pc);
+ e_import_status (
+ importer->import, (EImportTarget *)
+ importer->target, what, pc);
}
return TRUE;
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 174c34b7a0..d0697b1850 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -103,22 +103,32 @@ mbox_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
view = e_shell_window_get_active_view (shell_window);
if (view && g_str_equal (view, "mail")) {
- EShellView *shell_view = e_shell_window_get_shell_view (shell_window, view);
+ EShellView *shell_view;
+ EShellSidebar *shell_sidebar;
+ EMFolderTree *folder_tree = NULL;
- if (shell_view) {
- EMFolderTree *folder_tree = NULL;
- EShellSidebar *shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
+ shell_view = e_shell_window_get_shell_view (
+ shell_window, view);
- g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL);
+ shell_sidebar =
+ e_shell_view_get_shell_sidebar (shell_view);
- if (folder_tree)
- select_uri = em_folder_tree_get_selected_uri (folder_tree);
- }
+ g_object_get (
+ shell_sidebar, "folder-tree",
+ &folder_tree, NULL);
+
+ select_uri =
+ em_folder_tree_get_selected_uri (folder_tree);
+
+ g_object_unref (folder_tree);
}
}
- if (!select_uri)
- select_uri = g_strdup (e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_INBOX));
+ if (!select_uri) {
+ const gchar *uri;
+ uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_INBOX);
+ select_uri = g_strdup (uri);
+ }
hbox = gtk_hbox_new (FALSE, 0);
@@ -205,7 +215,9 @@ mbox_status_timeout (gpointer data)
pc = importer->status_pc;
g_mutex_unlock (importer->status_lock);
- e_import_status (importer->import, (EImportTarget *) importer->target, what, pc);
+ e_import_status (
+ importer->import, (EImportTarget *)
+ importer->target, what, pc);
}
return TRUE;
@@ -255,7 +267,8 @@ mbox_import (EImport *ei, EImportTarget *target, EImportImporter *im)
importer->cancellable, "status",
G_CALLBACK (mbox_status), importer);
- filename = g_filename_from_uri (((EImportTargetURI *) target)->uri_src, NULL, NULL);
+ filename = g_filename_from_uri (
+ ((EImportTargetURI *) target)->uri_src, NULL, NULL);
mail_importer_import_mbox (
session, filename, ((EImportTargetURI *) target)->uri_dest,
importer->cancellable, mbox_import_done, importer);
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 1c87afc7da..9f98779938 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -153,7 +153,9 @@ import_mbox_exec (struct _import_mbox_msg *m,
cancellable, _("Importing '%s'"),
camel_folder_get_full_name (folder));
camel_folder_freeze (folder);
- while (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step (mp, NULL, NULL) ==
+ CAMEL_MIME_PARSER_STATE_FROM) {
+
CamelMimeMessage *msg;
const gchar *tmp;
gint pc = 0;
@@ -337,9 +339,12 @@ import_folders_rec (struct _import_folders_data *m,
break;
}
/* FIXME: need a better way to get default store location */
- uri = g_strdup_printf("mbox:%s/local#%s", data_dir, folder);
+ uri = g_strdup_printf (
+ "mbox:%s/local#%s", data_dir, folder);
} else {
- uri = g_strdup_printf("mbox:%s/local#%s/%s", data_dir, folderparent, folder);
+ uri = g_strdup_printf (
+ "mbox:%s/local#%s/%s",
+ data_dir, folderparent, folder);
}
printf("importing to uri %s\n", uri);