aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/dbx-import
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-06 01:33:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-03-06 01:34:28 +0800
commitc6fd77460f5baf88528f5da2ffb99e86a2885ff0 (patch)
tree377ddb36bc9c907a06d5889123582b2066db42a8 /plugins/dbx-import
parent29d8b02c557a65aec4b015b274a830b402da2cfd (diff)
downloadgsoc2013-evolution-c6fd77460f5baf88528f5da2ffb99e86a2885ff0.tar.gz
gsoc2013-evolution-c6fd77460f5baf88528f5da2ffb99e86a2885ff0.tar.zst
gsoc2013-evolution-c6fd77460f5baf88528f5da2ffb99e86a2885ff0.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'plugins/dbx-import')
-rw-r--r--plugins/dbx-import/dbx-importer.c53
1 files changed, 39 insertions, 14 deletions
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index ca6fc1fd99..f4dd0506d5 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -81,13 +81,26 @@
#define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
#endif
-gboolean org_gnome_evolution_readdbx_supported (EPlugin *epl, EImportTarget *target);
-GtkWidget *org_gnome_evolution_readdbx_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im);
-void org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportImporter *im);
-void org_gnome_evolution_readdbx_cancel (EImport *ei, EImportTarget *target, EImportImporter *im);
-gint e_plugin_lib_enable (EPlugin *ep, gint enable);
-
-/* em-folder-selection-button.h is private, even though other internal evo plugins use it!
+gboolean org_gnome_evolution_readdbx_supported
+ (EPlugin *epl,
+ EImportTarget *target);
+GtkWidget * org_gnome_evolution_readdbx_getwidget
+ (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im);
+void org_gnome_evolution_readdbx_import
+ (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im);
+void org_gnome_evolution_readdbx_cancel
+ (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im);
+gint e_plugin_lib_enable (EPlugin *ep,
+ gint enable);
+
+/* em-folder-selection-button.h is private, even though other internal
+ * evo plugins use it!
so declare the functions here
TODO: sort out whether this should really be private
*/
@@ -184,7 +197,9 @@ folder_selected (EMFolderSelectionButton *button, EImportTargetURI *target)
}
GtkWidget *
-org_gnome_evolution_readdbx_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im)
+org_gnome_evolution_readdbx_getwidget (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
EShell *shell;
EShellBackend *shell_backend;
@@ -330,7 +345,8 @@ static gboolean dbx_load_index_table (DbxImporter *m, guint32 pos, guint32 *inde
return FALSE;
}
- d(printf("Index at %x: indexCount %x, anotherTablePtr %x\n", pos, tindex.indexCount, tindex.anotherTablePtr));
+ d(printf("Index at %x: indexCount %x, anotherTablePtr %x\n",
+ pos, tindex.indexCount, tindex.anotherTablePtr));
if (tindex.indexCount > 0) {
if (!dbx_load_index_table (m, tindex.anotherTablePtr, index_ofs))
@@ -454,7 +470,8 @@ dbx_read_mail_body (DbxImporter *m, guint32 offset, gint bodyfd)
buffer = g_malloc (buflen);
}
d(printf("Reading %d bytes from %lx\n", hdr.blocksize, offset + sizeof(hdr)));
- if (dbx_pread (m->dbx_fd, buffer, hdr.blocksize, offset + sizeof (hdr)) != hdr.blocksize) {
+ if (dbx_pread (m->dbx_fd, buffer, hdr.blocksize,
+ offset + sizeof (hdr)) != hdr.blocksize) {
g_set_error (
&m->base.error,
CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -560,7 +577,9 @@ dbx_import_file (DbxImporter *m)
gint missing = 0;
m->status_what = NULL;
filename = g_filename_from_uri (((EImportTargetURI *)m->target)->uri_src, NULL, NULL);
- m->parent_uri = g_strdup (((EImportTargetURI *)m->target)->uri_dest); /* Destination folder, was set in our widget */
+
+ /* Destination folder, was set in our widget */
+ m->parent_uri = g_strdup (((EImportTargetURI *)m->target)->uri_dest);
cancellable = e_activity_get_cancellable (m->base.activity);
@@ -727,7 +746,9 @@ dbx_status_timeout (gpointer data)
pc = importer->status_pc;
g_mutex_unlock (importer->status_lock);
- e_import_status (importer->target->import, (EImportTarget *)importer->target, what, pc);
+ e_import_status (
+ importer->target->import,
+ (EImportTarget *) importer->target, what, pc);
}
return TRUE;
@@ -747,7 +768,9 @@ dbx_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
/* Start the main import operation */
void
-org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportImporter *im)
+org_gnome_evolution_readdbx_import (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
DbxImporter *m;
@@ -774,7 +797,9 @@ org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportI
}
void
-org_gnome_evolution_readdbx_cancel (EImport *ei, EImportTarget *target, EImportImporter *im)
+org_gnome_evolution_readdbx_cancel (EImport *ei,
+ EImportTarget *target,
+ EImportImporter *im)
{
DbxImporter *m = g_datalist_get_data (&target->data, "dbx-msg");