diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-08 23:04:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-28 23:35:55 +0800 |
commit | a91eeb647138ee035444cdc3c265fa4e95898f29 (patch) | |
tree | 63b5712bc407630d6ad6e504244e6cc4ebc35a86 /plugins/pst-import | |
parent | 2c21832faab43a176dcb37bc2c65e9e3fb55fc9f (diff) | |
download | gsoc2013-evolution-a91eeb647138ee035444cdc3c265fa4e95898f29.tar.gz gsoc2013-evolution-a91eeb647138ee035444cdc3c265fa4e95898f29.tar.zst gsoc2013-evolution-a91eeb647138ee035444cdc3c265fa4e95898f29.zip |
Pass GCancellable to Camel.
Diffstat (limited to 'plugins/pst-import')
-rw-r--r-- | plugins/pst-import/pst-importer.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c index 6455ff42f7..7bd0138618 100644 --- a/plugins/pst-import/pst-importer.c +++ b/plugins/pst-import/pst-importer.c @@ -251,7 +251,8 @@ get_suggested_foldername (EImportTargetURI *target) g_string_append (foldername, "outlook_data"); } - if (mail_tool_uri_to_folder (foldername->str, 0, NULL) != NULL) { + /* FIXME Not passing a GCancellable or GError here. */ + if (mail_tool_uri_to_folder (foldername->str, 0, NULL, NULL) != NULL) { CamelFolder *folder; /* Folder exists - add a number */ @@ -261,7 +262,8 @@ get_suggested_foldername (EImportTargetURI *target) for (i=1; i<10000; i++) { g_string_truncate (foldername, len); g_string_append_printf (foldername, "_%d", i); - if ((folder=mail_tool_uri_to_folder (foldername->str, 0, NULL)) == NULL) { + /* FIXME Not passing a GCancellable or GError here. */ + if ((folder=mail_tool_uri_to_folder (foldername->str, 0, NULL, NULL)) == NULL) { /* Folder does not exist */ break; } @@ -452,7 +454,9 @@ pst_import_file (PstImporter *m) camel_operation_start (NULL, _("Importing '%s'"), filename); if (GPOINTER_TO_INT (g_datalist_get_data (&m->target->data, "pst-do-mail"))) { - mail_tool_uri_to_folder (m->parent_uri, CAMEL_STORE_FOLDER_CREATE, &m->base.error); + mail_tool_uri_to_folder ( + m->parent_uri, CAMEL_STORE_FOLDER_CREATE, + m->base.cancellable, &m->base.error); } ret = pst_init (&m->pst, filename); @@ -703,7 +707,9 @@ pst_create_folder (PstImporter *m) *pos = '\0'; - folder = mail_tool_uri_to_folder (dest, CAMEL_STORE_FOLDER_CREATE, &m->base.error); + folder = mail_tool_uri_to_folder ( + dest, CAMEL_STORE_FOLDER_CREATE, + m->base.cancellable, &m->base.error); g_object_unref (folder); *pos = '/'; } @@ -715,8 +721,9 @@ pst_create_folder (PstImporter *m) g_object_unref (m->folder); } - m->folder = mail_tool_uri_to_folder (m->folder_uri, CAMEL_STORE_FOLDER_CREATE, &m->base.error); - + m->folder = mail_tool_uri_to_folder ( + m->folder_uri, CAMEL_STORE_FOLDER_CREATE, + m->base.cancellable, &m->base.error); } /** @@ -916,12 +923,14 @@ pst_process_email (PstImporter *m, pst_item *item) if (item->flags & 0x08) camel_message_info_set_flags (info, CAMEL_MESSAGE_DRAFT, ~0); + /* FIXME Not passing a GCancellable or GError here. */ success = camel_folder_append_message ( - m->folder, msg, info, NULL, NULL); + m->folder, msg, info, NULL, NULL, NULL); camel_message_info_free (info); g_object_unref (msg); - camel_folder_sync (m->folder, FALSE, NULL); + /* FIXME Not passing a GCancellable or GError here. */ + camel_folder_sync (m->folder, FALSE, NULL, NULL); camel_folder_thaw (m->folder); if (!success) { |