From 299521f02c02278857dfd2561973dc0c94e44b57 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 1 Apr 2012 22:31:50 -0400 Subject: Whitespace cleanup. Replace 8-space indentation with tab characters, and various other automated cleanups. --- mail/e-mail-display.c | 222 +++++++++++++++++++++--------------------- mail/e-mail-printer.c | 30 +++--- mail/e-mail-reader-utils.c | 3 +- mail/e-mail-reader.c | 16 +-- mail/em-composer-utils.c | 2 +- mail/em-format-html-display.c | 46 ++++----- mail/em-format-html-print.c | 40 ++++---- mail/em-format-html.c | 110 ++++++++++----------- mail/em-utils.c | 2 +- mail/em-vfolder-editor-rule.c | 2 +- mail/mail-send-recv.c | 5 +- 11 files changed, 239 insertions(+), 239 deletions(-) (limited to 'mail') diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index 07f45ad461..a1d95bdaaa 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -167,11 +167,11 @@ mail_display_webview_update_actions (EWebView *web_view, g_return_if_fail (web_view != NULL); image_src = e_web_view_get_cursor_image_src (web_view); - visible = image_src && g_str_has_prefix (image_src, "cid:"); + visible = image_src && g_str_has_prefix (image_src, "cid:"); if (!visible && image_src) { CamelStream *image_stream; - image_stream = camel_data_cache_get (emd_global_http_cache, "http", image_src, NULL); + image_stream = camel_data_cache_get (emd_global_http_cache, "http", image_src, NULL); visible = image_stream != NULL; @@ -179,7 +179,7 @@ mail_display_webview_update_actions (EWebView *web_view, g_object_unref (image_stream); } - action = e_web_view_get_action (web_view, "image-save"); + action = e_web_view_get_action (web_view, "image-save"); if (action) gtk_action_set_visible (action, visible); } @@ -442,12 +442,12 @@ mail_display_resource_requested (WebKitWebView *web_view, const gchar *uri = webkit_network_request_get_uri (request); if (!formatter) { - webkit_network_request_set_uri (request, "invalid://uri"); + webkit_network_request_set_uri (request, "invalid://uri"); return; } /* Redirect cid:part_id to mail://mail_id/cid:part_id */ - if (g_str_has_prefix (uri, "cid:")) { + if (g_str_has_prefix (uri, "cid:")) { /* Always write raw content of CID object */ gchar *new_uri = em_format_build_mail_uri (formatter->folder, @@ -461,7 +461,7 @@ mail_display_resource_requested (WebKitWebView *web_view, /* WebKit won't allow to load a local file when displaing "remote" mail://, protocol, so we need to handle this manually */ - } else if (g_str_has_prefix (uri, "file:")) { + } else if (g_str_has_prefix (uri, "file:")) { gchar *path; path = g_filename_from_uri (uri, NULL, NULL); @@ -474,7 +474,7 @@ mail_display_resource_requested (WebKitWebView *web_view, /* Redirect http(s) request to evo-http(s) protocol. See EMailRequest for * further details about this. */ - } else if (g_str_has_prefix (uri, "http:") || g_str_has_prefix (uri, "https")) { + } else if (g_str_has_prefix (uri, "http:") || g_str_has_prefix (uri, "https")) { gchar *new_uri, *mail_uri, *enc; SoupURI *soup_uri; @@ -485,7 +485,7 @@ mail_display_resource_requested (WebKitWebView *web_view, /* Open Evolution's cache */ uri_md5 = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1); stream = camel_data_cache_get ( - emd_global_http_cache, "http", uri_md5, NULL); + emd_global_http_cache, "http", uri_md5, NULL); g_free (uri_md5); /* If the URI is not cached and we are not allowed to load it @@ -493,11 +493,11 @@ mail_display_resource_requested (WebKitWebView *web_view, * a native placeholder for it. */ if (!stream && !display->priv->force_image_load && !em_format_html_can_load_images (display->priv->formatter)) { - webkit_network_request_set_uri (request, "invalid://protocol"); + webkit_network_request_set_uri (request, "invalid://protocol"); return; } - new_uri = g_strconcat ("evo-", uri, NULL); + new_uri = g_strconcat ("evo-", uri, NULL); mail_uri = em_format_build_mail_uri (formatter->folder, formatter->message_uid, NULL, NULL); @@ -509,12 +509,12 @@ mail_display_resource_requested (WebKitWebView *web_view, g_free, g_free); } enc = soup_uri_encode (mail_uri, NULL); - g_hash_table_insert (query, g_strdup ("__evo-mail"), enc); + g_hash_table_insert (query, g_strdup ("__evo-mail"), enc); if (display->priv->force_image_load) { g_hash_table_insert (query, - g_strdup ("__evo-load-images"), - g_strdup ("true")); + g_strdup ("__evo-load-images"), + g_strdup ("true")); } g_free (mail_uri); @@ -545,7 +545,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++) { @@ -578,11 +578,11 @@ mail_display_plugin_widget_resize (GObject *object, widget = GTK_WIDGET (object); gtk_widget_get_preferred_height (widget, &height, NULL); - parent_element = g_object_get_data (object, "parent_element"); + 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", - G_STRFUNC, (gchar *) g_object_get_data (object, "uri"))); + d(printf("%s: %s does not have (valid) parent element!\n", + G_STRFUNC, (gchar *) g_object_get_data (object, "uri"))); return; } @@ -613,7 +613,7 @@ plugin_widget_set_parent_element (GtkWidget *widget, WebKitDOMDocument *document; WebKitDOMElement *element; - uri = g_object_get_data (G_OBJECT (widget), "uri"); + uri = g_object_get_data (G_OBJECT (widget), "uri"); if (!uri || !*uri) return; @@ -621,14 +621,14 @@ plugin_widget_set_parent_element (GtkWidget *widget, element = find_element_by_id (document, uri); if (!element || !WEBKIT_DOM_IS_ELEMENT (element)) { - g_warning ("Failed to find parent for '%s' - no ID set?", uri); + g_warning ("Failed to find parent for '%s' - no ID set?", uri); return; } /* Assign the WebKitDOMElement to "parent_element" data of the GtkWidget * and the GtkWidget to "widget" data of the DOM Element */ - g_object_set_data (G_OBJECT (widget), "parent_element", element); - g_object_set_data (G_OBJECT (element), "widget", widget); + g_object_set_data (G_OBJECT (widget), "parent_element", element); + g_object_set_data (G_OBJECT (element), "widget", widget); } static void @@ -641,22 +641,22 @@ attachment_button_expanded (GObject *object, WebKitDOMCSSStyleDeclaration *css; gboolean expanded; - d(printf("Attachment button %s (%p) expansion state toggled!\n", - (gchar *) g_object_get_data (object, "uri"), object)); + d(printf("Attachment button %s (%p) expansion state toggled!\n", + (gchar *) g_object_get_data (object, "uri"), object)); expanded = e_attachment_button_get_expanded (button) && gtk_widget_get_visible (GTK_WIDGET (button)); if (!WEBKIT_DOM_IS_ELEMENT (attachment)) { - d(printf("%s: Parent element for button %s does not exist!\n", - G_STRFUNC, (gchar *) g_object_get_data (object, "uri"))); + d(printf("%s: Parent element for button %s does not exist!\n", + G_STRFUNC, (gchar *) g_object_get_data (object, "uri"))); return; } /* Show or hide the DIV which contains the attachment (iframe, image...) */ css = webkit_dom_element_get_style (attachment); webkit_dom_css_style_declaration_set_property ( - css, "display", expanded ? "block" : "none", "", NULL); + css, "display", expanded ? "block" : "none", "", NULL); } static void @@ -691,10 +691,10 @@ bind_iframe_content_visibility (EAttachmentButton *button, document = webkit_dom_html_iframe_element_get_content_document ( WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe)); - nodes = webkit_dom_document_get_elements_by_tag_name (document, "object"); + nodes = webkit_dom_document_get_elements_by_tag_name (document, "object"); length = webkit_dom_node_list_get_length (nodes); - d(printf("Found %ld objects within iframe %s\n", length, + d(printf("Found %ld objects within iframe %s\n", length, webkit_dom_html_iframe_element_get_name ( WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe)))); @@ -705,22 +705,22 @@ bind_iframe_content_visibility (EAttachmentButton *button, WebKitDOMNode *node = webkit_dom_node_list_item (nodes, i); GtkWidget *widget; - widget = g_object_get_data (G_OBJECT (node), "widget"); + widget = g_object_get_data (G_OBJECT (node), "widget"); if (!widget) continue; - d(printf("Binding visibility of widget %s (%p) with button %s (%p)\n", - (gchar *) g_object_get_data (G_OBJECT (widget), "uri"), widget, - (gchar *) g_object_get_data (G_OBJECT (button), "uri"), button)); + d(printf("Binding visibility of widget %s (%p) with button %s (%p)\n", + (gchar *) g_object_get_data (G_OBJECT (widget), "uri"), widget, + (gchar *) g_object_get_data (G_OBJECT (button), "uri"), button)); g_object_bind_property ( - button, "expanded", - widget, "visible", + button, "expanded", + widget, "visible", G_BINDING_SYNC_CREATE); /* Ensure that someone won't attempt to _show() the widget when * it is supposed to be hidden and vice versa. */ - g_signal_connect (widget, "notify::visible", + g_signal_connect (widget, "notify::visible", G_CALLBACK (constraint_widget_visibility), button); } } @@ -750,7 +750,7 @@ bind_attachment_iframe_visibility (GObject *object, frame_name = webkit_web_frame_get_name (webframe); - d(printf("Rebinding visibility of frame %s because it's URL changed\n", + d(printf("Rebinding visibility of frame %s because it's URL changed\n", frame_name)); /* Get DOMDocument of the main document */ @@ -765,16 +765,16 @@ bind_attachment_iframe_visibility (GObject *object, if (!attachment) return; - button_uri = g_strconcat (frame_name, ".attachment_button", NULL); + button_uri = g_strconcat (frame_name, ".attachment_button", NULL); button_element = find_element_by_id (document, button_uri); g_free (button_uri); if (!button_element) return; - button = g_object_get_data (G_OBJECT (button_element), "widget"); + button = g_object_get_data (G_OBJECT (button_element), "widget"); /* Get " - "", + "", e_color_to_value (&efh->priv->colors[EM_FORMAT_HTML_COLOR_FRAME]), e_color_to_value (&efh->priv->colors[EM_FORMAT_HTML_COLOR_CONTENT]), uri); @@ -1077,7 +1077,7 @@ efh_write_headers (EMFormat *emf, g_string_append_printf (buffer, "" - "", + "", EVOLUTION_IMAGESDIR, (info->headers_collapsed) ? "plus.png" : "minus.png"); @@ -1151,7 +1151,7 @@ efh_write_message_rfc822 (EMFormat *emf, EMFormatPURI *p; p = iter->data; - if (g_str_has_suffix (p->uri, ".rfc822.end")) + if (g_str_has_suffix (p->uri, ".rfc822.end")) break; puris = g_list_append (puris, p); @@ -1180,12 +1180,12 @@ efh_write_message_rfc822 (EMFormat *emf, /* EMFormatHTMLPrint has registered a special writer * for headers, try to find it and use it. */ - if (g_str_has_suffix (p->uri, ".headers")) { + if (g_str_has_suffix (p->uri, ".headers")) { const EMFormatHandler *handler; handler = em_format_find_handler ( - emf, "x-evolution/message/headers"); + emf, "x-evolution/message/headers"); if (handler && handler->write_func) handler->write_func (emf, p, stream, info, cancellable); @@ -1193,10 +1193,10 @@ efh_write_message_rfc822 (EMFormat *emf, continue; } - if (g_str_has_suffix (p->uri, ".rfc822.end")) + if (g_str_has_suffix (p->uri, ".rfc822.end")) break; - if (g_str_has_suffix (p->uri, ".attachment-bar")) + if (g_str_has_suffix (p->uri, ".attachment-bar")) can_write = TRUE; if (can_write && p->write_func) { @@ -1223,17 +1223,17 @@ efh_write_message_rfc822 (EMFormat *emf, p = iter->data; uri = em_format_build_mail_uri (emf->folder, emf->message_uid, - "part_id", G_TYPE_STRING, p->uri, - "mode", G_TYPE_INT, EM_FORMAT_WRITE_MODE_RAW, + "part_id", G_TYPE_STRING, p->uri, + "mode", G_TYPE_INT, EM_FORMAT_WRITE_MODE_RAW, NULL); str = g_strdup_printf ( - "
" - "
\n" - "" - "
", + "
" + "
\n" + "" + "
", e_color_to_value (&efh->priv->colors[EM_FORMAT_HTML_COLOR_FRAME]), e_color_to_value (&efh->priv->colors[EM_FORMAT_HTML_COLOR_CONTENT]), uri, puri->uri); @@ -1582,14 +1582,14 @@ efh_write_message (EMFormat *emf, efh = (EMFormatHTML *) emf; header = g_strdup_printf ( - "\n\n" - "\n\n" - "Evolution Mail Display\n" - "\n" - "\n" - "", + "\n\n" + "\n\n" + "Evolution Mail Display\n" + "\n" + "\n" + "", e_color_to_value (&efh->priv->colors[ EM_FORMAT_HTML_COLOR_BODY])); @@ -1601,7 +1601,7 @@ efh_write_message (EMFormat *emf, efh_write_source (emf, emf->mail_part_list->data, stream, info, cancellable); - camel_stream_write_string (stream, "", cancellable, NULL); + camel_stream_write_string (stream, "", cancellable, NULL); return; } @@ -1617,7 +1617,7 @@ efh_write_message (EMFormat *emf, * These skipped PURIs contain entire RFC message which will * be written in