diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-04-02 10:31:50 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-04-02 11:15:38 +0800 |
commit | 299521f02c02278857dfd2561973dc0c94e44b57 (patch) | |
tree | e89760fc89b6e185780d242e4817ff4047efd564 /mail | |
parent | ccb3616af1dda65cc09093649d5333b9e3e19e11 (diff) | |
download | gsoc2013-evolution-299521f02c02278857dfd2561973dc0c94e44b57.tar.gz gsoc2013-evolution-299521f02c02278857dfd2561973dc0c94e44b57.tar.zst gsoc2013-evolution-299521f02c02278857dfd2561973dc0c94e44b57.zip |
Whitespace cleanup.
Replace 8-space indentation with tab characters, and various other
automated cleanups.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-display.c | 222 | ||||
-rw-r--r-- | mail/e-mail-printer.c | 30 | ||||
-rw-r--r-- | mail/e-mail-reader-utils.c | 3 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 16 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 2 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 46 | ||||
-rw-r--r-- | mail/em-format-html-print.c | 40 | ||||
-rw-r--r-- | mail/em-format-html.c | 110 | ||||
-rw-r--r-- | mail/em-utils.c | 2 | ||||
-rw-r--r-- | mail/em-vfolder-editor-rule.c | 2 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 5 |
11 files changed, 239 insertions, 239 deletions
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 <object> for '%s' - no ID set?", uri); + g_warning ("Failed to find parent <object> 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 <iframe> representing the attachment content */ - nodes = webkit_dom_element_get_elements_by_tag_name (attachment, "iframe"); + nodes = webkit_dom_element_get_elements_by_tag_name (attachment, "iframe"); length = webkit_dom_node_list_get_length (nodes); for (i = 0; i < length; i++) { @@ -805,8 +805,8 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, GtkWidget *widget; gchar *puri_uri; - puri_uri = g_hash_table_lookup (param, "data"); - if (!puri_uri || !g_str_has_prefix (uri, "mail://")) + puri_uri = g_hash_table_lookup (param, "data"); + if (!puri_uri || !g_str_has_prefix (uri, "mail://")) return NULL; display = E_MAIL_DISPLAY (web_view); @@ -828,11 +828,11 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, if (E_IS_ATTACHMENT_BUTTON (widget)) { /* Attachment button has URI different then the actual PURI because * that URI identifies the attachment itself */ - gchar *button_uri = g_strconcat (puri_uri, ".attachment_button", NULL); - g_object_set_data_full (G_OBJECT (widget), "uri", + gchar *button_uri = g_strconcat (puri_uri, ".attachment_button", NULL); + g_object_set_data_full (G_OBJECT (widget), "uri", button_uri, (GDestroyNotify) g_free); } else { - g_object_set_data_full (G_OBJECT (widget), "uri", + g_object_set_data_full (G_OBJECT (widget), "uri", g_strdup (puri_uri), (GDestroyNotify) g_free); } @@ -841,9 +841,9 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, /* Resizing a GtkWidget requires changing size of parent * <object> HTML element in DOM. */ - g_signal_connect (widget, "realize", + g_signal_connect (widget, "realize", G_CALLBACK (mail_display_plugin_widget_realize_cb), display); - g_signal_connect (widget, "size-allocate", + g_signal_connect (widget, "size-allocate", G_CALLBACK (mail_display_plugin_widget_resize), display); /* Embed the attachment bar into the GtkBox before we do anything @@ -859,9 +859,9 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0); - g_signal_connect (widget, "notify::expanded", + g_signal_connect (widget, "notify::expanded", G_CALLBACK (mail_display_plugin_widget_resize), display); - g_signal_connect (widget, "notify::active-view", + g_signal_connect (widget, "notify::active-view", G_CALLBACK (mail_display_plugin_widget_resize), display); /* Show the EAttachmentBar but not the containing layout */ @@ -889,10 +889,10 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, /* Show/hide the attachment when the EAttachmentButton * is expanded/collapsed or shown/hidden */ - g_signal_connect_data (widget, "notify::expanded", + g_signal_connect_data (widget, "notify::expanded", G_CALLBACK (attachment_button_expanded), g_object_ref (attachment), (GClosureNotify) g_object_unref, 0); - g_signal_connect_data (widget, "notify::visible", + g_signal_connect_data (widget, "notify::visible", G_CALLBACK (attachment_button_expanded), g_object_ref (attachment), (GClosureNotify) g_object_unref, 0); /* Initial synchronization */ @@ -902,7 +902,7 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, /* Find all <iframes> within the attachment and bind * it's visiblity to expanded state of the attachment btn */ nodes = webkit_dom_element_get_elements_by_tag_name ( - attachment, "iframe"); + attachment, "iframe"); length = webkit_dom_node_list_get_length (nodes); for (i = 0; i < length; i++) { @@ -922,7 +922,7 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, camel_mime_part_get_content_disposition (puri->part); if (disposition && g_ascii_strncasecmp ( - disposition->disposition, "inline", 6) == 0) { + disposition->disposition, "inline", 6) == 0) { e_attachment_button_set_expanded ( E_ATTACHMENT_BUTTON (widget), TRUE); @@ -930,7 +930,7 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, } } - d(printf("Created widget %s (%p)\n", puri_uri, widget)); + d(printf("Created widget %s (%p)\n", puri_uri, widget)); return widget; } @@ -948,38 +948,38 @@ toggle_headers_visibility (WebKitDOMElement *button, document = webkit_web_view_get_dom_document (web_view); short_headers = webkit_dom_document_get_element_by_id ( - document, "__evo-short-headers"); + document, "__evo-short-headers"); if (!short_headers) return; css_short = webkit_dom_element_get_style (short_headers); full_headers = webkit_dom_document_get_element_by_id ( - document, "__evo-full-headers"); + document, "__evo-full-headers"); if (!full_headers) return; css_full = webkit_dom_element_get_style (full_headers); expanded = (g_strcmp0 (webkit_dom_css_style_declaration_get_property_value ( - css_full, "display"), "block") == 0); + css_full, "display"), "block") == 0); - webkit_dom_css_style_declaration_set_property (css_full, "display", - expanded ? "none" : "block", "", NULL); - webkit_dom_css_style_declaration_set_property (css_short, "display", - expanded ? "block" : "none", "", NULL); + webkit_dom_css_style_declaration_set_property (css_full, "display", + expanded ? "none" : "block", "", NULL); + webkit_dom_css_style_declaration_set_property (css_short, "display", + expanded ? "block" : "none", "", NULL); if (expanded) - path = "evo-file://" EVOLUTION_IMAGESDIR "/plus.png"; + path = "evo-file://" EVOLUTION_IMAGESDIR "/plus.png"; else - path = "evo-file://" EVOLUTION_IMAGESDIR "/minus.png"; + path = "evo-file://" EVOLUTION_IMAGESDIR "/minus.png"; webkit_dom_html_image_element_set_src ( WEBKIT_DOM_HTML_IMAGE_ELEMENT (button), path); e_mail_display_set_headers_collapsed (E_MAIL_DISPLAY (web_view), expanded); - d(printf("Headers %s!\n", expanded ? "collapsed" : "expanded")); + d(printf("Headers %s!\n", expanded ? "collapsed" : "expanded")); } static const gchar* addresses[] = { "to", "cc", "bcc" }; @@ -998,7 +998,7 @@ toggle_address_visibility (WebKitDOMElement *button, document = webkit_dom_node_get_owner_document (WEBKIT_DOM_NODE (button)); - id = g_strconcat ("__evo-moreaddr-", address, NULL); + id = g_strconcat ("__evo-moreaddr-", address, NULL); full_addr = webkit_dom_document_get_element_by_id (document, id); g_free (id); @@ -1007,7 +1007,7 @@ toggle_address_visibility (WebKitDOMElement *button, css_full = webkit_dom_element_get_style (full_addr); - id = g_strconcat ("__evo-moreaddr-ellipsis-", address, NULL); + id = g_strconcat ("__evo-moreaddr-ellipsis-", address, NULL); ellipsis = webkit_dom_document_get_element_by_id (document, id); g_free (id); @@ -1018,21 +1018,21 @@ toggle_address_visibility (WebKitDOMElement *button, expanded = (g_strcmp0 ( webkit_dom_css_style_declaration_get_property_value ( - css_full, "display"), "inline") == 0); + css_full, "display"), "inline") == 0); webkit_dom_css_style_declaration_set_property ( - css_full, "display", (expanded ? "none" : "inline"), "", NULL); + css_full, "display", (expanded ? "none" : "inline"), "", NULL); webkit_dom_css_style_declaration_set_property ( - css_ellipsis, "display", (expanded ? "inline" : "none"), "", NULL); + css_ellipsis, "display", (expanded ? "inline" : "none"), "", NULL); if (expanded) { - path = "evo-file://" EVOLUTION_IMAGESDIR "/plus.png"; + path = "evo-file://" EVOLUTION_IMAGESDIR "/plus.png"; } else { - path = "evo-file://" EVOLUTION_IMAGESDIR "/minus.png"; + path = "evo-file://" EVOLUTION_IMAGESDIR "/minus.png"; } if (!WEBKIT_DOM_IS_HTML_IMAGE_ELEMENT (button)) { - id = g_strconcat ("__evo-moreaddr-img-", address, NULL); + id = g_strconcat ("__evo-moreaddr-img-", address, NULL); button = webkit_dom_document_get_element_by_id (document, id); g_free (id); @@ -1066,19 +1066,19 @@ setup_DOM_bindings (GObject *object, document = webkit_web_view_get_dom_document (web_view); button = webkit_dom_document_get_element_by_id ( - document, "__evo-collapse-headers-img"); + document, "__evo-collapse-headers-img"); if (!button) return; - d(printf("Conntecting to __evo-collapsable-headers-img::click event\n")); + d(printf("Conntecting to __evo-collapsable-headers-img::click event\n")); webkit_dom_event_target_add_event_listener ( - WEBKIT_DOM_EVENT_TARGET (button), "click", + WEBKIT_DOM_EVENT_TARGET (button), "click", G_CALLBACK (toggle_headers_visibility), FALSE, web_view); for (i = 0; i < 3; i++) { gchar *id; - id = g_strconcat ("__evo-moreaddr-img-", addresses[i], NULL); + id = g_strconcat ("__evo-moreaddr-img-", addresses[i], NULL); button = webkit_dom_document_get_element_by_id (document, id); g_free (id); @@ -1086,11 +1086,11 @@ setup_DOM_bindings (GObject *object, continue; webkit_dom_event_target_add_event_listener ( - WEBKIT_DOM_EVENT_TARGET (button), "click", + WEBKIT_DOM_EVENT_TARGET (button), "click", G_CALLBACK (toggle_address_visibility), FALSE, (gpointer) addresses[i]); - id = g_strconcat ("__evo-moreaddr-ellipsis-", addresses[i], NULL); + id = g_strconcat ("__evo-moreaddr-ellipsis-", addresses[i], NULL); button = webkit_dom_document_get_element_by_id (document, id); g_free (id); @@ -1098,7 +1098,7 @@ setup_DOM_bindings (GObject *object, continue; webkit_dom_event_target_add_event_listener ( - WEBKIT_DOM_EVENT_TARGET (button), "click", + WEBKIT_DOM_EVENT_TARGET (button), "click", G_CALLBACK (toggle_address_visibility), FALSE, (gpointer) addresses[i]); } @@ -1152,7 +1152,7 @@ puri_bind_dom (GObject *object, if (puri->bind_func) { WebKitDOMElement *el = find_element_by_id (document, puri->uri); if (el) { - d(printf("bind_func for %s\n", puri->uri)); + d(printf("bind_func for %s\n", puri->uri)); puri->bind_func (el, puri); } } @@ -1166,12 +1166,12 @@ mail_display_frame_created (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data) { - d(printf("Frame %s created!\n", webkit_web_frame_get_name (frame))); + d(printf("Frame %s created!\n", webkit_web_frame_get_name (frame))); /* Re-bind visibility of this newly created <iframe> with * related EAttachmentButton whenever content of this <iframe> is * (re)loaded */ - g_signal_connect (frame, "notify::load-status", + g_signal_connect (frame, "notify::load-status", G_CALLBACK (bind_attachment_iframe_visibility), NULL); /* Call bind_func of all PURIs written in this frame */ @@ -1258,30 +1258,30 @@ e_mail_display_init (EMailDisplay *display) gtk_action_group_add_actions (display->priv->mailto_actions, mailto_entries, G_N_ELEMENTS (mailto_entries), NULL); - display->priv->images_actions = gtk_action_group_new ("image"); + display->priv->images_actions = gtk_action_group_new ("image"); gtk_action_group_add_actions (display->priv->images_actions, image_entries, G_N_ELEMENTS (image_entries), NULL); webkit_web_view_set_full_content_zoom (WEBKIT_WEB_VIEW (display), TRUE); settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (display)); - g_object_set (settings, "enable-frame-flattening", TRUE, NULL); + g_object_set (settings, "enable-frame-flattening", TRUE, NULL); - g_signal_connect (display, "navigation-policy-decision-requested", + g_signal_connect (display, "navigation-policy-decision-requested", G_CALLBACK (mail_display_link_clicked), NULL); - g_signal_connect (display, "resource-request-starting", + g_signal_connect (display, "resource-request-starting", G_CALLBACK (mail_display_resource_requested), NULL); - g_signal_connect (display, "process-mailto", + g_signal_connect (display, "process-mailto", G_CALLBACK (mail_display_process_mailto), NULL); - g_signal_connect (display, "update-actions", + g_signal_connect (display, "update-actions", G_CALLBACK (mail_display_webview_update_actions), NULL); - g_signal_connect (display, "create-plugin-widget", + g_signal_connect (display, "create-plugin-widget", G_CALLBACK (mail_display_plugin_widget_requested), NULL); - g_signal_connect (display, "frame-created", + g_signal_connect (display, "frame-created", G_CALLBACK (mail_display_frame_created), NULL); main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (display)); - g_signal_connect (main_frame, "notify::load-status", + g_signal_connect (main_frame, "notify::load-status", G_CALLBACK (setup_DOM_bindings), NULL); main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (display)); g_signal_connect (main_frame, "notify::load-status", @@ -1295,7 +1295,7 @@ e_mail_display_init (EMailDisplay *display) gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error); if (error != NULL) { - g_error ("%s", error->message); + g_error ("%s", error->message); g_error_free (error); } @@ -1304,7 +1304,7 @@ e_mail_display_init (EMailDisplay *display) gtk_ui_manager_add_ui_from_string (ui_manager, image_ui, -1, &error); if (error != NULL) { - g_error ("%s", error->message); + g_error ("%s", error->message); g_error_free (error); } @@ -1353,11 +1353,11 @@ e_mail_display_set_formatter (EMailDisplay *display, mail_display_update_formatter_colors (display); - g_signal_connect (formatter, "notify::image-loading-policy", + g_signal_connect (formatter, "notify::image-loading-policy", G_CALLBACK (formatter_image_loading_policy_changed_cb), display); g_signal_connect_swapped (formatter, "redraw-requested", G_CALLBACK (e_mail_display_reload), display); - g_signal_connect_swapped (formatter, "notify::charset", + g_signal_connect_swapped (formatter, "notify::charset", G_CALLBACK (e_mail_display_reload), display); g_object_notify (G_OBJECT (display), "formatter"); @@ -1450,9 +1450,9 @@ e_mail_display_load (EMailDisplay *display, emf = EM_FORMAT (display->priv->formatter); uri = em_format_build_mail_uri (emf->folder, emf->message_uid, - "mode", G_TYPE_INT, display->priv->mode, - "headers_collapsable", G_TYPE_BOOLEAN, display->priv->headers_collapsable, - "headers_collapsed", G_TYPE_BOOLEAN, display->priv->headers_collapsed, + "mode", G_TYPE_INT, display->priv->mode, + "headers_collapsable", G_TYPE_BOOLEAN, display->priv->headers_collapsable, + "headers_collapsed", G_TYPE_BOOLEAN, display->priv->headers_collapsed, NULL); e_web_view_load_uri (E_WEB_VIEW (display), uri); @@ -1489,7 +1489,7 @@ e_mail_display_reload (EMailDisplay *display) new_uri = g_string_new (base); g_free (base); - table = soup_form_decode (strstr (uri, "?") + 1); + table = soup_form_decode (strstr (uri, "?") + 1); g_hash_table_insert (table, g_strdup ("mode"), g_strdup_printf ("%d", display->priv->mode)); g_hash_table_insert (table, g_strdup ("headers_collapsable"), g_strdup_printf ("%d", display->priv->headers_collapsable)); g_hash_table_insert (table, g_strdup ("headers_collapsed"), g_strdup_printf ("%d", display->priv->headers_collapsed)); @@ -1535,19 +1535,19 @@ e_mail_display_set_status (EMailDisplay *display, g_return_if_fail (E_IS_MAIL_DISPLAY (display)); str = g_strdup_printf ( - "<!DOCTYPE>" - "<html>" - "<head><title>Evolution Mail Display</title></head>" - "<body>" - "<table border=\"0\" width=\"100%%\" height=\"100%%\">" - "<tr height=\"100%%\" valign=\"middle\">" - "<td width=\"100%%\" align=\"center\">" - "<strong>%s</strong>" - "</td>" - "</tr>" - "</table>" - "</body>" - "</html>", status); + "<!DOCTYPE>" + "<html>" + "<head><title>Evolution Mail Display</title></head>" + "<body>" + "<table border=\"0\" width=\"100%%\" height=\"100%%\">" + "<tr height=\"100%%\" valign=\"middle\">" + "<td width=\"100%%\" align=\"center\">" + "<strong>%s</strong>" + "</td>" + "</tr>" + "</table>" + "</body>" + "</html>", status); e_web_view_load_string (E_WEB_VIEW (display), str); g_free (str); diff --git a/mail/e-mail-printer.c b/mail/e-mail-printer.c index f0fb8412a5..0a52a0a5b2 100644 --- a/mail/e-mail-printer.c +++ b/mail/e-mail-printer.c @@ -204,7 +204,7 @@ emp_run_print_operation (EMailPrinter *emp) if (emp->priv->uri) g_free (emp->priv->uri); - emp->priv->uri = g_strconcat (mail_uri, "?part_id=print_layout&__evo-load-images=1", NULL); + emp->priv->uri = g_strconcat (mail_uri, "?part_id=print_layout&__evo-load-images=1", NULL); if (emp->priv->webview == NULL) { emp->priv->webview = g_object_new (E_TYPE_MAIL_DISPLAY, NULL); @@ -212,7 +212,7 @@ emp_run_print_operation (EMailPrinter *emp) e_mail_display_set_force_load_images ( E_MAIL_DISPLAY (emp->priv->webview), TRUE); g_object_ref_sink (emp->priv->webview); - g_signal_connect (emp->priv->webview, "notify::load-status", + g_signal_connect (emp->priv->webview, "notify::load-status", G_CALLBACK (emp_start_printing), emp); w ({ @@ -245,14 +245,14 @@ set_header_visible (EMailPrinter *emp, WebKitDOMCSSStyleDeclaration *style; document = webkit_web_view_get_dom_document (emp->priv->webview); - headers = webkit_dom_document_get_elements_by_class_name (document, "header-item"); + headers = webkit_dom_document_get_elements_by_class_name (document, "header-item"); g_return_if_fail (index < webkit_dom_node_list_get_length (headers)); element = WEBKIT_DOM_ELEMENT (webkit_dom_node_list_item (headers, index)); style = webkit_dom_element_get_style (element); webkit_dom_css_style_declaration_set_property (style, - "display", (visible ? "table-row" : "none"), "", NULL); + "display", (visible ? "table-row" : "none"), "", NULL); } static void @@ -380,7 +380,7 @@ emp_headers_tab_move (GtkWidget *button, /* The order of header rows in the HMTL document should be in sync with order of headers in the listview and in efhp->headers_list */ document = webkit_web_view_get_dom_document (emp->priv->webview); - headers = webkit_dom_document_get_elements_by_class_name (document, "header-item"); + headers = webkit_dom_document_get_elements_by_class_name (document, "header-item"); l = g_list_nth (selected_rows, g_list_length (selected_rows) / 2); selection_middle = gtk_tree_row_reference_new (model, l->data); @@ -520,7 +520,7 @@ emp_create_headers_tab (GtkPrintOperation *operation, view = GTK_TREE_VIEW (emp->priv->treeview); selection = gtk_tree_view_get_selection (view); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); - g_signal_connect (selection, "changed", + g_signal_connect (selection, "changed", G_CALLBACK (emp_headers_tab_selection_changed), emp); renderer = gtk_cell_renderer_toggle_new (); @@ -549,41 +549,41 @@ emp_create_headers_tab (GtkPrintOperation *operation, button = gtk_button_new_from_stock (GTK_STOCK_SELECT_ALL); emp->priv->buttons[BUTTON_SELECT_ALL] = button; - g_signal_connect (button, "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (emp_headers_tab_toggle_selection), emp); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5); button = gtk_button_new_from_stock (GTK_STOCK_CLEAR); emp->priv->buttons[BUTTON_SELECT_NONE] = button; - g_signal_connect (button, "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (emp_headers_tab_toggle_selection), emp); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5); button = gtk_button_new_from_stock (GTK_STOCK_GOTO_TOP); emp->priv->buttons[BUTTON_TOP] = button; gtk_widget_set_sensitive (button, FALSE); - g_signal_connect (button, "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (emp_headers_tab_move), emp); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5); button = gtk_button_new_from_stock (GTK_STOCK_GO_UP); emp->priv->buttons[BUTTON_UP] = button; gtk_widget_set_sensitive (button, FALSE); - g_signal_connect (button, "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (emp_headers_tab_move), emp); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5); button = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN); emp->priv->buttons[BUTTON_DOWN] = button; gtk_widget_set_sensitive (button, FALSE); - g_signal_connect (button, "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (emp_headers_tab_move), emp); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5); button = gtk_button_new_from_stock (GTK_STOCK_GOTO_BOTTOM); emp->priv->buttons[BUTTON_BOTTOM] = button; gtk_widget_set_sensitive (button, FALSE); - g_signal_connect (button, "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (emp_headers_tab_move), emp); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5); @@ -781,7 +781,7 @@ e_mail_printer_init (EMailPrinter *emp) } EMailPrinter * -e_mail_printer_new (EMFormatHTML * source) +e_mail_printer_new (EMFormatHTML *source) { EMailPrinter *emp; EMFormatHTMLPrint *efhp; @@ -813,13 +813,13 @@ e_mail_printer_print (EMailPrinter *emp, G_CALLBACK (emp_create_headers_tab), emp); g_signal_connect (emp->priv->operation, "done", G_CALLBACK (emp_printing_done), emp); - g_signal_connect (emp->priv->operation, "draw-page", + g_signal_connect (emp->priv->operation, "draw-page", G_CALLBACK (emp_draw_footer), NULL); emp->priv->export_mode = export_mode; if (cancellable) - g_signal_connect_swapped (cancellable, "cancelled", + g_signal_connect_swapped (cancellable, "cancelled", G_CALLBACK (gtk_print_operation_cancel), emp->priv->operation); emp_run_print_operation (emp); diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 54c588b9c9..d43ef27dc3 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -234,7 +234,7 @@ e_mail_reader_delete_folder (EMailReader *reader, shell = e_shell_backend_get_shell (E_SHELL_BACKEND (backend)); - if(!store_is_local && !e_shell_get_online (shell)) + if (!store_is_local && !e_shell_get_online (shell)) { e_alert_submit ( alert_sink, "mail:online-operation", @@ -242,7 +242,6 @@ e_mail_reader_delete_folder (EMailReader *reader, return; } - have_flags = mail_folder_cache_get_folder_info_flags ( folder_cache, folder, &flags); diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 4940fbe321..da1fdb5905 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -301,7 +301,7 @@ action_mail_image_save_cb (GtkAction *action, g_return_if_fail (emf != NULL); g_return_if_fail (emf->message != NULL); - if (g_str_has_prefix (image_src, "cid:")) { + if (g_str_has_prefix (image_src, "cid:")) { part = camel_mime_message_get_part_by_content_id ( emf->message, image_src + 4); g_return_if_fail (part != NULL); @@ -317,7 +317,7 @@ action_mail_image_save_cb (GtkAction *action, /* Open cache and find the file there */ user_cache_dir = e_get_user_cache_dir (); cache = camel_data_cache_new (user_cache_dir, NULL); - image_stream = camel_data_cache_get (cache, "http", image_src, NULL); + image_stream = camel_data_cache_get (cache, "http", image_src, NULL); if (!image_stream) { g_object_unref (cache); return; @@ -335,7 +335,7 @@ action_mail_image_save_cb (GtkAction *action, dw = camel_data_wrapper_new (); camel_data_wrapper_set_mime_type ( - dw, "application/octet-stream"); + dw, "application/octet-stream"); camel_data_wrapper_construct_from_stream_sync ( dw, image_stream, NULL, NULL); camel_medium_set_content (CAMEL_MEDIUM (part), dw); @@ -350,7 +350,7 @@ action_mail_image_save_cb (GtkAction *action, file = e_shell_run_save_dialog ( e_shell_get_default (), - _("Save Image"), camel_mime_part_get_filename (part), + _("Save Image"), camel_mime_part_get_filename (part), NULL, NULL, NULL); if (file == NULL) { g_object_unref (part); @@ -2817,7 +2817,7 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader) g_free (string); activity = e_mail_reader_new_activity (reader); - e_activity_set_text (activity, _("Retrieving message")); + e_activity_set_text (activity, _("Retrieving message")); cancellable = e_activity_get_cancellable (activity); closure = g_slice_new0 (EMailReaderClosure); @@ -3040,7 +3040,7 @@ formatter_weak_ref_cb (struct _formatter_weak_ref_closure *data, g_hash_table_remove (data->formatters, data->mail_uri); - d(printf("Destroying formatter %p (%s)\n", formatter, data->mail_uri)); + d(printf("Destroying formatter %p (%s)\n", formatter, data->mail_uri)); /* Destroying the formatter will prevent this callback * being called, so we can remove the closure data as well */ @@ -3985,10 +3985,10 @@ e_mail_reader_init (EMailReader *reader, action, "activate", G_CALLBACK (action_search_folder_sender_cb), reader); - action_name = "image-save"; + action_name = "image-save"; action = e_mail_display_get_action (display, action_name); g_signal_connect ( - action, "activate", + action, "activate", G_CALLBACK (action_mail_image_save_cb), reader); #ifndef G_OS_WIN32 diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index acff5e9b4f..5bacb2e38a 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -962,7 +962,7 @@ em_utils_composer_print_cb (EMsgComposer *composer, /* Use EMailPrinter and WebKit to print the message */ emp = e_mail_printer_new ((EMFormatHTML *) efhd); - g_signal_connect (emp, "done", + g_signal_connect (emp, "done", G_CALLBACK (composer_print_done_cb), efhd); e_mail_printer_print (emp, FALSE, NULL); diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 2a42beb943..889d69fdb1 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -383,7 +383,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, g_object_unref (builder); g_signal_connect ( - po->widget, "response", + po->widget, "response", G_CALLBACK (efhd_xpkcs7mime_info_response), po); gtk_widget_show (po->widget); @@ -529,8 +529,8 @@ efhd_parse_attachment (EMFormat *emf, * We have converted text/ * to text/html, other (binary) formats remained * untouched. */ ct = camel_content_type_decode (handler->mime_type); - if (g_strcmp0 (ct->type, "text") == 0) - puri->puri.mime_type = g_strdup ("text/html"); + if (g_strcmp0 (ct->type, "text") == 0) + puri->puri.mime_type = g_strdup ("text/html"); else puri->puri.mime_type = camel_content_type_simple (ct); camel_content_type_unref (ct); @@ -617,7 +617,7 @@ efhd_parse_optional (EMFormat *emf, gint len; len = part_id->len; - g_string_append (part_id, ".optional"); + g_string_append (part_id, ".optional"); puri = (EMFormatAttachmentPURI *) em_format_puri_new ( emf, sizeof (EMFormatAttachmentPURI), part, part_id->str); @@ -718,9 +718,9 @@ efhd_write_attachment_bar (EMFormat *emf, return; str = g_strdup_printf ( - "<object type=\"application/x-attachment-bar\" " + "<object type=\"application/x-attachment-bar\" " "height=\"20\" width=\"100%%\" " - "id=\"%s\"data=\"%s\"></object>", puri->uri, puri->uri); + "id=\"%s\"data=\"%s\"></object>", puri->uri, puri->uri); camel_stream_write_string (stream, str, cancellable, NULL); @@ -762,19 +762,19 @@ efhd_write_attachment (EMFormat *emf, else mime_type = efa->snoop_mime_type; - button_id = g_strconcat (puri->uri, ".attachment_button", NULL); + button_id = g_strconcat (puri->uri, ".attachment_button", NULL); desc = em_format_describe_part (puri->part, mime_type); str = g_strdup_printf ( - "<div class=\"attachment\">" - "<table width=\"100%%\" border=\"0\">" - "<tr valign=\"middle\">" - "<td align=\"left\" width=\"100\">" - "<object type=\"application/x-attachment-button\" " + "<div class=\"attachment\">" + "<table width=\"100%%\" border=\"0\">" + "<tr valign=\"middle\">" + "<td align=\"left\" width=\"100\">" + "<object type=\"application/x-attachment-button\" " "height=\"20\" width=\"100\" data=\"%s\" id=\"%s\"></object>" - "</td>" - "<td align=\"left\">%s</td>" - "</tr>", puri->uri, button_id, desc); + "</td>" + "<td align=\"left\">%s</td>" + "</tr>", puri->uri, button_id, desc); camel_stream_write_string (stream, str, cancellable, NULL); g_free (desc); @@ -786,8 +786,8 @@ efhd_write_attachment (EMFormat *emf, (efa->attachment_view_part_id)) { str = g_strdup_printf ( - "<tr><td colspan=\"2\">" - "<div class=\"attachment-wrapper\" id=\"%s\">", + "<tr><td colspan=\"2\">" + "<div class=\"attachment-wrapper\" id=\"%s\">", puri->uri); camel_stream_write_string (stream, str, cancellable, NULL); @@ -805,10 +805,10 @@ efhd_write_attachment (EMFormat *emf, p->write_func (emf, p, stream, info, cancellable); } - camel_stream_write_string (stream, "</div></td></tr>", cancellable, NULL); + camel_stream_write_string (stream, "</div></td></tr>", cancellable, NULL); } - camel_stream_write_string (stream, "</table></div>", cancellable, NULL); + camel_stream_write_string (stream, "</table></div>", cancellable, NULL); } static void @@ -825,9 +825,9 @@ efhd_write_secure_button (EMFormat *emf, return; str = g_strdup_printf ( - "<object type=\"application/x-secure-button\" " - "height=\"20\" width=\"100%%\" " - "data=\"%s\" id=\"%s\"></object>", puri->uri, puri->uri); + "<object type=\"application/x-secure-button\" " + "height=\"20\" width=\"100%%\" " + "data=\"%s\" id=\"%s\"></object>", puri->uri, puri->uri); camel_stream_write_string (stream, str, cancellable, NULL); @@ -1045,7 +1045,7 @@ efhd_attachment_button (EMFormat *emf, } widget = e_attachment_button_new (); - g_object_set_data (G_OBJECT (widget), "uri", puri->uri); + g_object_set_data (G_OBJECT (widget), "uri", puri->uri); e_attachment_button_set_attachment ( E_ATTACHMENT_BUTTON (widget), info->attachment); e_attachment_button_set_view ( diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c index ed64a9ea07..150c16dbf5 100644 --- a/mail/em-format-html-print.c +++ b/mail/em-format-html-print.c @@ -75,12 +75,12 @@ efhp_write_attachments_list (EMFormatHTMLPrint *efhp, return; str = g_string_new ( - "<table border=\"0\" cellspacing=\"5\" cellpadding=\"0\" " - "class=\"attachments-list\" >\n"); + "<table border=\"0\" cellspacing=\"5\" cellpadding=\"0\" " + "class=\"attachments-list\" >\n"); g_string_append_printf (str, - "<tr><th colspan=\"2\"><h1>%s</h1></td></tr>\n" - "<tr><th>%s</th><th>%s</th></tr>\n", - _("Attachments"), _("Name"), _("Size")); + "<tr><th colspan=\"2\"><h1>%s</h1></td></tr>\n" + "<tr><th>%s</th><th>%s</th></tr>\n", + _("Attachments"), _("Name"), _("Size")); for (iter = efhp->priv->attachments; iter; iter = iter->next) { EMFormatPURI *puri = iter->data; @@ -97,7 +97,7 @@ efhp_write_attachments_list (EMFormatHTMLPrint *efhp, if (e_attachment_get_description (attachment) && *e_attachment_get_description (attachment)) { - name = g_strdup_printf ("%s (%s)", + name = g_strdup_printf ("%s (%s)", e_attachment_get_description (attachment), g_file_info_get_display_name (fi)); } else { @@ -108,14 +108,14 @@ efhp_write_attachments_list (EMFormatHTMLPrint *efhp, ba = camel_data_wrapper_get_byte_array (dw); size = g_format_size (ba->len); - g_string_append_printf (str, "<tr><td>%s</td><td>%s</td></tr>\n", + g_string_append_printf (str, "<tr><td>%s</td><td>%s</td></tr>\n", name, size); g_free (name); g_free (size); } - g_string_append (str, "</table>\n"); + g_string_append (str, "</table>\n"); camel_stream_write_string (stream, str->str, cancellable, NULL); g_string_free (str, TRUE); @@ -140,12 +140,12 @@ efhp_write_headers (EMFormat *emf, buf = camel_medium_get_header (CAMEL_MEDIUM (puri->part), "subject"); subject = camel_header_decode_string (buf, "UTF-8"); str = g_string_new ("<table border=\"0\" cellspacing=\"5\" " \ - "cellpadding=\"0\" class=\"printing-header\">\n"); + "cellpadding=\"0\" class=\"printing-header\">\n"); g_string_append_printf ( str, - "<tr class=\"header-item\">" - "<td colspan=\"2\"><h1>%s</h1></td>" - "</tr>\n", + "<tr class=\"header-item\">" + "<td colspan=\"2\"><h1>%s</h1></td>" + "</tr>\n", subject); g_free (subject); @@ -181,7 +181,7 @@ efhp_write_headers (EMFormat *emf, } /* Get prefix of this PURI */ - puri_prefix = g_strndup (puri->uri, g_strrstr (puri->uri, ".") - puri->uri); + puri_prefix = g_strndup (puri->uri, g_strrstr (puri->uri, ".") - puri->uri); /* Add encryption/signature header */ raw_header.name = _("Security"); @@ -282,11 +282,11 @@ efhp_write_inline_attachment (EMFormat *emf, if (e_attachment_get_description (attachment) && *e_attachment_get_description (attachment)) { - name = g_strdup_printf ("<h2>Attachment: %s (%s)</h2>\n", + name = g_strdup_printf ("<h2>Attachment: %s (%s)</h2>\n", e_attachment_get_description (attachment), g_file_info_get_display_name (fi)); } else { - name = g_strdup_printf ("<h2>Attachment: %s</h2>\n", + name = g_strdup_printf ("<h2>Attachment: %s</h2>\n", g_file_info_get_display_name (fi)); } @@ -314,7 +314,7 @@ efhp_write_print_layout (EMFormat *emf, "<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\" />\n" "<title>Evolution Mail Display</title>\n" "<link type=\"text/css\" rel=\"stylesheet\" media=\"print\" " - "href=\"evo-file://" EVOLUTION_PRIVDATADIR "/theme/webview-print.css\" />\n" + "href=\"evo-file://" EVOLUTION_PRIVDATADIR "/theme/webview-print.css\" />\n" "</head>\n" "<body style=\"background: #FFF; color: #000;\">", cancellable, NULL); @@ -336,7 +336,7 @@ efhp_write_print_layout (EMFormat *emf, puri->write_func (emf, puri, stream, &print_info, cancellable); - while (iter && !g_str_has_suffix (puri->uri, ".rfc822.end")) { + while (iter && !g_str_has_suffix (puri->uri, ".rfc822.end")) { iter = iter->next; if (iter) @@ -355,15 +355,15 @@ efhp_write_print_layout (EMFormat *emf, CamelContentType *ct; gchar *mime_type; - if (puri->cid && g_ascii_strncasecmp (puri->cid, "cid:", 4) == 0) + if (puri->cid && g_ascii_strncasecmp (puri->cid, "cid:", 4) == 0) continue; ct = camel_mime_part_get_content_type (puri->part); mime_type = camel_content_type_simple (ct); handler = em_format_find_handler (puri->emf, mime_type); - d(printf("Handler for PURI %s (%s): %s\n", puri->uri, mime_type, - handler ? handler->mime_type : "(null)")); + d(printf("Handler for PURI %s (%s): %s\n", puri->uri, mime_type, + handler ? handler->mime_type : "(null)")); g_free (mime_type); efhp->priv->attachments = diff --git a/mail/em-format-html.c b/mail/em-format-html.c index ab3324d73a..0dd190eba9 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -149,7 +149,7 @@ efh_parse_image (EMFormat *emf, tmp = camel_mime_part_get_content_id (part); if (!tmp) { em_format_parse_part_as (emf, part, part_id, info, - "x-evolution/message/attachment", cancellable); + "x-evolution/message/attachment", cancellable); return; } @@ -522,7 +522,7 @@ efh_parse_message_rfc822 (EMFormat *emf, /* Create an empty PURI that will represent start of the RFC message */ puri = em_format_puri_new (emf, sizeof (EMFormatPURI), part, part_id->str); puri->write_func = efh_write_message_rfc822; - puri->mime_type = g_strdup ("text/html"); + puri->mime_type = g_strdup ("text/html"); puri->is_attachment = info->is_attachment; em_format_add_puri (emf, puri); @@ -544,7 +544,7 @@ efh_parse_message_rfc822 (EMFormat *emf, /* Add another generic PURI that represents end of the RFC message. * The em_format_write() function will skip all PURIs between the ".rfc822" * PURI and ".rfc822.end" PURI as they will be rendered in an <iframe> */ - g_string_append (part_id, ".end"); + g_string_append (part_id, ".end"); puri = em_format_puri_new (emf, sizeof (EMFormatPURI), NULL, part_id->str); em_format_add_puri (emf, puri); @@ -901,11 +901,11 @@ efh_write_text_html (EMFormat *emf, } else if (g_ascii_strncasecmp (tag, "script", 6) == 0) { tags = g_list_append ( tags, - get_tag ("script", opening, closing)); + get_tag ("script", opening, closing)); } else if (g_ascii_strncasecmp (tag, "link", 4) == 0) { tags = g_list_append ( tags, - get_tag ("link", opening, closing)); + get_tag ("link", opening, closing)); } else if (g_ascii_strncasecmp (tag, "body", 4) == 0) { valid = TRUE; break; @@ -983,7 +983,7 @@ efh_write_text_html (EMFormat *emf, "<div class=\"part-container-inner-margin\">\n" "<iframe width=\"100%%\" height=\"auto\"" " frameborder=\"0\" src=\"%s\"></iframe>" - "</div></div>", + "</div></div>", 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, "<img src=\"evo-file://%s/%s\" class=\"navigable\" " "id=\"__evo-collapse-headers-img\" />" - "</td><td>", + "</td><td>", 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 ( - "<div class=\"part-container\" style=\"border-color: #%06x; " - "background-color: #%06x;\">" - "<div class=\"part-container-inner-margin\">\n" - "<iframe width=\"100%%\" height=\"auto\"" - " frameborder=\"0\" src=\"%s\" name=\"%s\"></iframe>" - "</div></div>", + "<div class=\"part-container\" style=\"border-color: #%06x; " + "background-color: #%06x;\">" + "<div class=\"part-container-inner-margin\">\n" + "<iframe width=\"100%%\" height=\"auto\"" + " frameborder=\"0\" src=\"%s\" name=\"%s\"></iframe>" + "</div></div>", 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 ( - "<!DOCTYPE HTML>\n<html>\n" - "<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\" />\n" - "<title>Evolution Mail Display</title>\n" - "<link type=\"text/css\" rel=\"stylesheet\" href=\"evo-file://" EVOLUTION_PRIVDATADIR "/theme/webview.css\" />\n" - "<style type=\"text/css\">\n" - " table th { color: #000; font-weight: bold; }\n" - "</style>\n" - "</head><body bgcolor=\"#%06x\">", + "<!DOCTYPE HTML>\n<html>\n" + "<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\" />\n" + "<title>Evolution Mail Display</title>\n" + "<link type=\"text/css\" rel=\"stylesheet\" href=\"evo-file://" EVOLUTION_PRIVDATADIR "/theme/webview.css\" />\n" + "<style type=\"text/css\">\n" + " table th { color: #000; font-weight: bold; }\n" + "</style>\n" + "</head><body bgcolor=\"#%06x\">", 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, "</body></html>", cancellable, NULL); + camel_stream_write_string (stream, "</body></html>", cancellable, NULL); return; } @@ -1617,7 +1617,7 @@ efh_write_message (EMFormat *emf, * These skipped PURIs contain entire RFC message which will * be written in <iframe> as attachment. */ - if (g_str_has_suffix (puri->uri, ".rfc822")) { + if (g_str_has_suffix (puri->uri, ".rfc822")) { /* If the PURI is not an attachment, then we must * inline it here otherwise it would not be displayed. */ @@ -1632,13 +1632,13 @@ efh_write_message (EMFormat *emf, puri->write_func (emf, p, stream, info, cancellable); } - while (iter && !g_str_has_suffix (puri->uri, ".rfc822.end")) { + while (iter && !g_str_has_suffix (puri->uri, ".rfc822.end")) { iter = iter->next; if (iter) puri = iter->data; - d(printf(".rfc822 - skipping %s\n", puri->uri)); + d(printf(".rfc822 - skipping %s\n", puri->uri)); } /* Skip the .rfc822.end PURI as well. */ @@ -1656,7 +1656,7 @@ efh_write_message (EMFormat *emf, } } - camel_stream_write_string (stream, "</body></html>", cancellable, NULL); + camel_stream_write_string (stream, "</body></html>", cancellable, NULL); } static void @@ -1811,8 +1811,8 @@ efh_class_init (EMFormatHTMLClass *klass) object_class, PROP_ANIMATE_IMAGES, g_param_spec_boolean ( - "animate-images", - "Animate images", + "animate-images", + "Animate images", NULL, FALSE, G_PARAM_READWRITE)); @@ -2077,7 +2077,7 @@ em_format_html_set_animate_images (EMFormatHTML *efh, efh->priv->animate_images = animate_images; - g_object_notify (G_OBJECT (efh), "animate-images"); + g_object_notify (G_OBJECT (efh), "animate-images"); } CamelMimePart * @@ -2193,29 +2193,29 @@ efh_format_text_header (EMFormatHTML *emfh, if (flags & EM_FORMAT_HEADER_BOLD) { fmt = "<tr class=\"header-item\" style=\"display: %s\"><td><b>%s:</b> %s</td></tr>"; } else { - fmt = "<tr class=\"header-item\" style=\"display: %s\"><td>%s: %s</td></tr>"; + fmt = "<tr class=\"header-item\" style=\"display: %s\"><td>%s: %s</td></tr>"; } } else if (flags & EM_FORMAT_HTML_HEADER_NODEC) { if (is_rtl) - fmt = "<tr class=\"header-item rtl\" style=\"display: %s\"><td align=\"right\" valign=\"top\" width=\"100%%\">%2$s</td><th valign=top align=\"left\" nowrap>%1$s<b> </b></th></tr>"; + fmt = "<tr class=\"header-item rtl\" style=\"display: %s\"><td align=\"right\" valign=\"top\" width=\"100%%\">%2$s</td><th valign=top align=\"left\" nowrap>%1$s<b> </b></th></tr>"; else - fmt = "<tr class=\"header-item\" style=\"display: %s\"><th align=\"right\" valign=\"top\" nowrap>%s<b> </b></th><td valign=top>%s</td></tr>"; + fmt = "<tr class=\"header-item\" style=\"display: %s\"><th align=\"right\" valign=\"top\" nowrap>%s<b> </b></th><td valign=top>%s</td></tr>"; } else { if (flags & EM_FORMAT_HEADER_BOLD) { if (is_rtl) - fmt = "<tr class=\"header-item rtl\" style=\"display: %s\"><td align=\"right\" valign=\"top\" width=\"100%%\">%2$s</td><th align=\"left\" nowrap>%1$s:<b> </b></th></tr>"; + fmt = "<tr class=\"header-item rtl\" style=\"display: %s\"><td align=\"right\" valign=\"top\" width=\"100%%\">%2$s</td><th align=\"left\" nowrap>%1$s:<b> </b></th></tr>"; else - fmt = "<tr class=\"header-item\" style=\"display: %s\"><th align=\"right\" valign=\"top\" nowrap>%s:<b> </b></th><td>%s</td></tr>"; + fmt = "<tr class=\"header-item\" style=\"display: %s\"><th align=\"right\" valign=\"top\" nowrap>%s:<b> </b></th><td>%s</td></tr>"; } else { if (is_rtl) - fmt = "<tr class=\"header-item rtl\" style=\"display: %s\"><td align=\"right\" valign=\"top\" width=\"100%\">%2$s</td><td align=\"left\" nowrap>%1$s:<b> </b></td></tr>"; + fmt = "<tr class=\"header-item rtl\" style=\"display: %s\"><td align=\"right\" valign=\"top\" width=\"100%\">%2$s</td><td align=\"left\" nowrap>%1$s:<b> </b></td></tr>"; else - fmt = "<tr class=\"header-item\" style=\"display: %s\"><td align=\"right\" valign=\"top\" nowrap>%s:<b> </b></td><td>%s</td></tr>"; + fmt = "<tr class=\"header-item\" style=\"display: %s\"><td align=\"right\" valign=\"top\" nowrap>%s:<b> </b></td><td>%s</td></tr>"; } } g_string_append_printf (buffer, fmt, - (flags & EM_FORMAT_HTML_HEADER_HIDDEN ? "none" : "table-row"), label, html); + (flags & EM_FORMAT_HTML_HEADER_HIDDEN ? "none" : "table-row"), label, html); g_free (mhtml); } @@ -2562,8 +2562,8 @@ efh_format_short_headers (EMFormatHTML *efh, from = g_string_new (""); g_string_append_printf (buffer, - "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" " - "id=\"__evo-short-headers\" style=\"display: %s\">", + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" " + "id=\"__evo-short-headers\" style=\"display: %s\">", visible ? "block" : "none"); header = ((CamelMimePart *) part)->headers; @@ -2596,15 +2596,15 @@ efh_format_short_headers (EMFormatHTML *efh, if (is_rtl) { g_string_append_printf ( buffer, - "<tr><td width=\"100%%\" align=\"right\">%s%s%s <strong>%s</strong></td></tr>", - from->len ? "(" : "", from->str, from->len ? ")" : "", - subject ? subject : _("(no subject)")); + "<tr><td width=\"100%%\" align=\"right\">%s%s%s <strong>%s</strong></td></tr>", + from->len ? "(" : "", from->str, from->len ? ")" : "", + subject ? subject : _("(no subject)")); } else { g_string_append_printf ( buffer, - "<tr><td><strong>%s</strong> %s%s%s</td></tr>", - subject ? subject : _("(no subject)"), - from->len ? "(" : "", from->str, from->len ? ")" : ""); + "<tr><td><strong>%s</strong> %s%s%s</td></tr>", + subject ? subject : _("(no subject)"), + from->len ? "(" : "", from->str, from->len ? ")" : ""); } g_string_append (buffer, "</table>"); @@ -2652,8 +2652,8 @@ efh_format_full_headers (EMFormatHTML *efh, evolution_imagesdir = g_filename_to_uri (EVOLUTION_IMAGESDIR, NULL, NULL); g_string_append_printf (buffer, - "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" " - "id=\"__evo-full-headers\" style=\"display: %s\" width=\"100%%\">", + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" " + "id=\"__evo-full-headers\" style=\"display: %s\" width=\"100%%\">", visible ? "block" : "none"); header = ((CamelMimePart *) part)->headers; @@ -2970,7 +2970,7 @@ em_format_html_animation_extract_frame (const GByteArray *anim, /* Unforunatelly, GdkPixbuf cannot save to GIF, but WebKit does not * have any trouble displaying PNG image despite the part having * image/gif mime-type */ - gdk_pixbuf_save_to_buffer (frame_buf, frame, len, "png", NULL, NULL); + gdk_pixbuf_save_to_buffer (frame_buf, frame, len, "png", NULL, NULL); g_object_unref (loader); } diff --git a/mail/em-utils.c b/mail/em-utils.c index 52856865b9..8a6383d755 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -984,7 +984,7 @@ em_utils_selection_set_urilist (GtkSelectionData *data, gchar *exporttype; gint exportname; - tmpdir = e_mkdtemp("drag-n-drop-XXXXXX"); + tmpdir = e_mkdtemp("drag-n-drop-XXXXXX"); if (tmpdir == NULL) return; diff --git a/mail/em-vfolder-editor-rule.c b/mail/em-vfolder-editor-rule.c index 1ee69dd12a..380031d876 100644 --- a/mail/em-vfolder-editor-rule.c +++ b/mail/em-vfolder-editor-rule.c @@ -433,7 +433,7 @@ get_widget (EFilterRule *fr, builder = gtk_builder_new (); e_load_ui_builder_definition (builder, "mail-dialogs.ui"); - frame = e_builder_get_widget(builder, "vfolder_source_frame"); + frame = e_builder_get_widget(builder, "vfolder_source_frame"); g_object_set_data_full((GObject *)frame, "data", data, g_free); diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index bee7e2119f..7bbb85bda6 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -844,7 +844,8 @@ receive_status (CamelFilterDriver *driver, /* when receive/send is complete */ static void -receive_done (int still_more, gpointer data) +receive_done (gint still_more, + gpointer data) { struct _send_info *info = data; const gchar *uid; @@ -1472,7 +1473,7 @@ mail_receive_service (CamelService *service) case SEND_RECEIVE: mail_fetch_mail ( CAMEL_STORE (service), - info->keep_on_server, 0, -1, + info->keep_on_server, 0, -1, E_FILTER_SOURCE_INCOMING, NULL, NULL, NULL, info->cancellable, |