aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-08-29 22:44:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-08-29 23:22:28 +0800
commit4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9 (patch)
treece1154c5d7487fbd566c5b68df90fb8259b4604e /mail/importers
parente6c42ecc596fb16247e8d1d591a5d244a61d0e24 (diff)
downloadgsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.gz
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.tar.zst
gsoc2013-evolution-4c05b9e925764a6035e3d0fcbfc1f0458d36f5d9.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/evolution-mbox-importer.c53
1 files changed, 36 insertions, 17 deletions
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 8467f2c47f..2d18bf62db 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -253,7 +253,8 @@ static MboxImporterCreatePreviewFunc create_preview_func = NULL;
static MboxImporterFillPreviewFunc fill_preview_func = NULL;
void
-mbox_importer_set_preview_funcs (MboxImporterCreatePreviewFunc create_func, MboxImporterFillPreviewFunc fill_func)
+mbox_importer_set_preview_funcs (MboxImporterCreatePreviewFunc create_func,
+ MboxImporterFillPreviewFunc fill_func)
{
create_preview_func = create_func;
fill_preview_func = fill_func;
@@ -311,7 +312,9 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
fd = g_open (filename, O_RDONLY|O_BINARY, 0);
if (fd == -1) {
- g_warning ("Cannot find source file to import '%s': %s", filename, g_strerror (errno));
+ g_warning (
+ "Cannot find source file to import '%s': %s",
+ filename, g_strerror (errno));
g_free (filename);
return NULL;
}
@@ -330,24 +333,28 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
gchar *from;
msg = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp, NULL) == -1) {
+ if (camel_mime_part_construct_from_parser (
+ (CamelMimePart *)msg, mp, NULL) == -1) {
g_object_unref (msg);
break;
}
if (!store)
- store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, CAMEL_TYPE_MIME_MESSAGE);
+ store = gtk_list_store_new (
+ 3, G_TYPE_STRING, G_TYPE_STRING,
+ CAMEL_TYPE_MIME_MESSAGE);
from = NULL;
if (camel_mime_message_get_from (msg))
- from = camel_address_encode (CAMEL_ADDRESS (camel_mime_message_get_from (msg)));
+ from = camel_address_encode (
+ CAMEL_ADDRESS (
+ camel_mime_message_get_from (msg)));
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- 0, camel_mime_message_get_subject (msg) ? camel_mime_message_get_subject (msg) : "",
- 1, from ? from : "",
- 2, msg,
- -1);
+ 0, camel_mime_message_get_subject (msg) ?
+ camel_mime_message_get_subject (msg) : "",
+ 1, from ? from : "", 2, msg, -1);
g_object_unref (msg);
g_free (from);
@@ -358,39 +365,51 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
if (store) {
GtkTreeView *tree_view;
GtkTreeSelection *selection;
+ gboolean valid;
preview = e_web_view_preview_new ();
gtk_widget_show (preview);
- tree_view = e_web_view_preview_get_tree_view (E_WEB_VIEW_PREVIEW (preview));
+ tree_view = e_web_view_preview_get_tree_view (
+ E_WEB_VIEW_PREVIEW (preview));
g_return_val_if_fail (tree_view != NULL, NULL);
gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (store));
g_object_unref (store);
/* Translators: Column header for a message subject */
- gtk_tree_view_insert_column_with_attributes (tree_view, -1, C_("mboxImp", "Subject"),
+ gtk_tree_view_insert_column_with_attributes (
+ tree_view, -1, C_("mboxImp", "Subject"),
gtk_cell_renderer_text_new (), "text", 0, NULL);
/* Translators: Column header for a message From address */
- gtk_tree_view_insert_column_with_attributes (tree_view, -1, C_("mboxImp", "From"),
+ gtk_tree_view_insert_column_with_attributes (
+ tree_view, -1, C_("mboxImp", "From"),
gtk_cell_renderer_text_new (), "text", 1, NULL);
if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), NULL) > 1)
- e_web_view_preview_show_tree_view (E_WEB_VIEW_PREVIEW (preview));
+ e_web_view_preview_show_tree_view (
+ E_WEB_VIEW_PREVIEW (preview));
create_preview_func (G_OBJECT (preview), &preview_widget);
g_return_val_if_fail (preview_widget != NULL, NULL);
- e_web_view_preview_set_preview (E_WEB_VIEW_PREVIEW (preview), preview_widget);
+ e_web_view_preview_set_preview (
+ E_WEB_VIEW_PREVIEW (preview), preview_widget);
gtk_widget_show (preview_widget);
selection = gtk_tree_view_get_selection (tree_view);
- g_return_val_if_fail (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter), NULL);
+ valid = gtk_tree_model_get_iter_first (
+ GTK_TREE_MODEL (store), &iter);
+ g_return_val_if_fail (valid, NULL);
gtk_tree_selection_select_iter (selection, &iter);
- g_signal_connect (selection, "changed", G_CALLBACK (preview_selection_changed_cb), preview);
- preview_selection_changed_cb (selection, E_WEB_VIEW_PREVIEW (preview));
+ g_signal_connect (
+ selection, "changed",
+ G_CALLBACK (preview_selection_changed_cb), preview);
+
+ preview_selection_changed_cb (
+ selection, E_WEB_VIEW_PREVIEW (preview));
}
return preview;