From c85109fc322137596bf34cffc5445d568223c60d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 12 Jul 2012 08:02:18 -0400 Subject: Coding style and whitespace cleanup. --- mail/e-http-request.c | 43 ++--- mail/e-mail-backend.c | 2 +- mail/e-mail-browser.c | 7 +- mail/e-mail-config-confirm-page.c | 6 +- mail/e-mail-config-welcome-page.c | 2 +- mail/e-mail-display-popup-extension.c | 3 +- mail/e-mail-display.c | 144 ++++++++++------- mail/e-mail-label-manager.c | 2 +- mail/e-mail-migrate.c | 2 +- mail/e-mail-notebook-view.c | 13 +- mail/e-mail-paned-view.c | 10 +- mail/e-mail-printer.c | 96 +++++++----- mail/e-mail-reader-utils.c | 29 ++-- mail/e-mail-reader.c | 23 ++- mail/e-mail-request.c | 14 +- mail/e-mail-ui-session.c | 3 - mail/em-composer-utils.c | 5 +- mail/em-filter-editor-folder-element.c | 4 +- mail/em-filter-editor.c | 3 +- mail/em-filter-rule.c | 40 ++--- mail/em-filter-source-element.c | 16 +- mail/em-folder-tree.c | 5 +- mail/em-folder-utils.c | 14 +- mail/em-utils.c | 45 +++--- mail/em-vfolder-editor-context.c | 2 +- mail/em-vfolder-editor-rule.c | 44 ++++-- mail/importers/elm-importer.c | 22 +-- mail/importers/evolution-mbox-importer.c | 11 +- mail/importers/mail-importer.c | 10 +- mail/importers/pine-importer.c | 34 ++-- mail/mail-autofilter.c | 22 +-- mail/mail-send-recv.c | 22 +-- mail/mail-vfolder-ui.c | 6 +- mail/message-list.c | 260 ++++++++++++++++--------------- 34 files changed, 536 insertions(+), 428 deletions(-) (limited to 'mail') diff --git a/mail/e-http-request.c b/mail/e-http-request.c index 6f564b6410..0f634688a2 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -49,7 +49,6 @@ struct _EHTTPRequestPrivate { G_DEFINE_TYPE (EHTTPRequest, e_http_request, SOUP_TYPE_REQUEST) - static gssize copy_stream_to_stream (CamelStream *input, GMemoryInputStream *output, @@ -168,8 +167,9 @@ handle_http_request (GSimpleAsyncResult *res, stream = g_memory_input_stream_new (); - len = copy_stream_to_stream (cache_stream, - G_MEMORY_INPUT_STREAM (stream), cancellable); + len = copy_stream_to_stream ( + cache_stream, + G_MEMORY_INPUT_STREAM (stream), cancellable); request->priv->content_length = len; g_object_unref (cache_stream); @@ -184,13 +184,15 @@ handle_http_request (GSimpleAsyncResult *res, path = camel_data_cache_get_filename (cache, "http", uri_md5); file = g_file_new_for_path (path); - info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, - 0, cancellable, NULL); + info = g_file_query_info ( + file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, + 0, cancellable, NULL); request->priv->content_type = g_strdup ( g_file_info_get_content_type (info)); - d(printf ("'%s' found in cache (%d bytes, %s)\n", + d ( + printf ("'%s' found in cache (%d bytes, %s)\n", uri, request->priv->content_length, request->priv->content_type)); @@ -203,7 +205,7 @@ handle_http_request (GSimpleAsyncResult *res, goto cleanup; } else { - d(printf("Failed to load '%s' from cache.\n", uri)); + d (printf ("Failed to load '%s' from cache.\n", uri)); } } @@ -291,7 +293,8 @@ handle_http_request (GSimpleAsyncResult *res, error = NULL; cache_stream = camel_data_cache_add (cache, "http", uri_md5, &error); if (!cache_stream) { - g_warning ("Failed to create cache file for '%s': %s", + g_warning ( + "Failed to create cache file for '%s': %s", uri, error ? error->message : "Unknown error"); g_clear_error (&error); @@ -356,12 +359,12 @@ handle_http_request (GSimpleAsyncResult *res, g_object_unref (msg); g_idle_add ((GSourceFunc) unref_soup_session, session); - d(printf ("Received image from %s\n" - "Content-Type: %s\n" - "Content-Length: %d bytes\n" - "URI MD5: %s:\n", - uri, request->priv->content_type, - request->priv->content_length, uri_md5)); + d (printf ("Received image from %s\n" + "Content-Type: %s\n" + "Content-Length: %d bytes\n" + "URI MD5: %s:\n", + uri, request->priv->content_type, + request->priv->content_length, uri_md5)); g_simple_async_result_set_op_res_gpointer (res, stream, NULL); goto cleanup; @@ -396,8 +399,8 @@ http_request_finalize (GObject *object) static gboolean http_request_check_uri (SoupRequest *request, - SoupURI *uri, - GError **error) + SoupURI *uri, + GError **error) { return ((strcmp (uri->scheme, "evo-http") == 0) || (strcmp (uri->scheme, "evo-https") == 0)); @@ -421,9 +424,9 @@ http_request_send_async (SoupRequest *request, uri = soup_request_get_uri (request); query = soup_form_decode (uri->query); - d({ + d ({ gchar *uri_str = soup_uri_to_string (uri, FALSE); - printf("received request for %s\n", uri_str); + printf ("received request for %s\n", uri_str); g_free (uri_str); }); @@ -481,7 +484,7 @@ http_request_get_content_length (SoupRequest *request) { EHTTPRequest *efr = E_HTTP_REQUEST (request); - d(printf("Content-Length: %d bytes\n", efr->priv->content_length)); + d (printf ("Content-Length: %d bytes\n", efr->priv->content_length)); return efr->priv->content_length; } @@ -490,7 +493,7 @@ http_request_get_content_type (SoupRequest *request) { EHTTPRequest *efr = E_HTTP_REQUEST (request); - d(printf("Content-Type: %s\n", efr->priv->content_type)); + d (printf ("Content-Type: %s\n", efr->priv->content_type)); return efr->priv->content_type; } diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index e0a0275019..ae6aebba9a 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -377,7 +377,7 @@ mail_backend_quit_requested_cb (EShell *shell, /* In express mode, don't raise mail request in non mail window. */ if (e_shell_get_express_mode (shell) && - strcmp(e_shell_window_get_active_view((EShellWindow *)window), "mail") != 0) + strcmp (e_shell_window_get_active_view ((EShellWindow *) window), "mail") != 0) return; if (!e_shell_backend_is_started (mail_shell_backend)) diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c index f337c5cc71..7535785c35 100644 --- a/mail/e-mail-browser.c +++ b/mail/e-mail-browser.c @@ -584,8 +584,9 @@ mail_browser_constructed (GObject *object) browser->priv->message_list, "message-list-built", G_CALLBACK (mail_browser_message_list_built_cb), object); - display = g_object_new (E_TYPE_MAIL_DISPLAY, - "mode", E_MAIL_BROWSER (object)->priv->mode, NULL); + display = g_object_new ( + E_TYPE_MAIL_DISPLAY, + "mode", E_MAIL_BROWSER (object)->priv->mode, NULL); g_signal_connect_swapped ( display, "popup-event", @@ -679,7 +680,7 @@ mail_browser_constructed (GObject *object) gtk_style_context_add_class ( gtk_widget_get_style_context (widget), - GTK_STYLE_CLASS_PRIMARY_TOOLBAR); + GTK_STYLE_CLASS_PRIMARY_TOOLBAR); gtk_container_add (GTK_CONTAINER (container), browser->priv->preview_pane); diff --git a/mail/e-mail-config-confirm-page.c b/mail/e-mail-config-confirm-page.c index 6d276263e4..327794f070 100644 --- a/mail/e-mail-config-confirm-page.c +++ b/mail/e-mail-config-confirm-page.c @@ -155,9 +155,9 @@ e_mail_config_confirm_page_class_init (EMailConfigConfirmPageClass *class) "Text", "Confirmation message", _("Congratulations, your mail configuration is " - "complete.\n\nYou are now ready to send and " - "receive email using Evolution.\n\nClick " - "\"Apply\" to save your settings."), + "complete.\n\nYou are now ready to send and " + "receive email using Evolution.\n\nClick " + "\"Apply\" to save your settings."), G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); diff --git a/mail/e-mail-config-welcome-page.c b/mail/e-mail-config-welcome-page.c index 9196bb8c2f..ff61f1e167 100644 --- a/mail/e-mail-config-welcome-page.c +++ b/mail/e-mail-config-welcome-page.c @@ -155,7 +155,7 @@ e_mail_config_welcome_page_class_init (EMailConfigWelcomePageClass *class) "Text", "Welcome message", _("Welcome to the Evolution Mail Configuration " - "Assistant.\n\nClick \"Continue\" to begin."), + "Assistant.\n\nClick \"Continue\" to begin."), G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); diff --git a/mail/e-mail-display-popup-extension.c b/mail/e-mail-display-popup-extension.c index a4441797c3..d84a9ca967 100644 --- a/mail/e-mail-display-popup-extension.c +++ b/mail/e-mail-display-popup-extension.c @@ -24,7 +24,6 @@ G_DEFINE_INTERFACE ( e_mail_display_popup_extension, G_TYPE_OBJECT) - static void e_mail_display_popup_extension_default_init (EMailDisplayPopupExtensionInterface *iface) { @@ -42,7 +41,7 @@ e_mail_display_popup_extension_default_init (EMailDisplayPopupExtensionInterface */ void e_mail_display_popup_extension_update_actions (EMailDisplayPopupExtension *extension, - WebKitHitTestResult *context) + WebKitHitTestResult *context) { EMailDisplayPopupExtensionInterface *iface; diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index e7af641f5a..1783600725 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -165,7 +165,7 @@ static GtkActionEntry image_entries[] = { static gboolean mail_display_button_press_event (GtkWidget *widget, - GdkEventButton *event) + GdkEventButton *event) { WebKitHitTestResult *hit_test; WebKitHitTestResultContext context; @@ -187,7 +187,7 @@ mail_display_button_press_event (GtkWidget *widget, g_object_get ( G_OBJECT (hit_test), "context", &context, - "image-uri", &image_src, + "image-uri", &image_src, NULL); if ((context & WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE)) { @@ -550,23 +550,26 @@ mail_display_resource_requested (WebKitWebView *web_view, } new_uri = g_strconcat ("evo-", uri, NULL); - mail_uri = e_mail_part_build_uri (part_list->folder, - part_list->message_uid, NULL, NULL); + mail_uri = e_mail_part_build_uri ( + part_list->folder, + part_list->message_uid, NULL, NULL); soup_uri = soup_uri_new (new_uri); if (soup_uri->query) { query = soup_form_decode (soup_uri->query); } else { - query = g_hash_table_new_full (g_str_hash, g_str_equal, - g_free, g_free); + query = g_hash_table_new_full ( + g_str_hash, g_str_equal, + g_free, g_free); } enc = soup_uri_encode (mail_uri, NULL); g_hash_table_insert (query, g_strdup ("__evo-mail"), enc); if (display->priv->force_image_load) { - g_hash_table_insert (query, + g_hash_table_insert ( + query, g_strdup ("__evo-load-images"), - g_strdup ("true")); + g_strdup ("true")); } g_free (mail_uri); @@ -600,7 +603,7 @@ find_element_by_id (WebKitDOMDocument *document, return element; /* If the element is not here then recursively scan all frames */ - frames = webkit_dom_document_get_elements_by_tag_name(document, "iframe"); + frames = webkit_dom_document_get_elements_by_tag_name (document, "iframe"); length = webkit_dom_node_list_get_length (frames); for (i = 0; i < length; i++) { @@ -635,7 +638,8 @@ mail_display_plugin_widget_resize (GObject *object, parent_element = g_object_get_data (object, "parent_element"); if (!parent_element || !WEBKIT_DOM_IS_ELEMENT (parent_element)) { - d(printf("%s: %s does not have (valid) parent element!\n", + d ( + printf ("%s: %s does not have (valid) parent element!\n", G_STRFUNC, (gchar *) g_object_get_data (object, "uri"))); return; } @@ -805,7 +809,7 @@ bind_iframe_content_visibility (WebKitDOMElement *iframe, d ({ gchar *name = webkit_dom_html_iframe_element_get_name ( WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe)); - printf("Found %ld objects within iframe %s\n", length, name); + printf ("Found %ld objects within iframe %s\n", length, name); g_free (name); }); @@ -833,7 +837,8 @@ attachment_button_expanded (GObject *object, gboolean expanded; gchar *id; - d(printf("Attachment button %s has been %s!\n", + d ( + printf ("Attachment button %s has been %s!\n", (gchar *) g_object_get_data (object, "uri"), (e_attachment_button_get_expanded (button) ? "expanded" : "collapsed"))); @@ -844,7 +849,8 @@ attachment_button_expanded (GObject *object, element = find_element_by_id (document, g_object_get_data (object, "attachment_id")); if (!WEBKIT_DOM_IS_ELEMENT (element)) { - d(printf("%s: Content
of attachment %s does not exist!!\n", + d ( + printf ("%s: Content
of attachment %s does not exist!!\n", G_STRFUNC, (gchar *) g_object_get_data (object, "uri"))); return; } @@ -859,8 +865,9 @@ attachment_button_expanded (GObject *object, g_free (id); if (!WEBKIT_DOM_IS_HTML_IFRAME_ELEMENT (element)) { - d(printf("%s: No