r2289 - in /experimental/evolution/debian: ./ patches/
sjoerd at users.alioth.debian.org
sjoerd at users.alioth.debian.org
Thu Oct 18 20:41:11 UTC 2012
Author: sjoerd
Date: Thu Oct 18 20:41:10 2012
New Revision: 2289
URL: http://svn.debian.org/wsvn/pkg-evolution/?sc=1&rev=2289
Log:
* New upstream release
* debian/patches/02*.patch:
+ Added. post-release 3.6.1 relese patches from the evo gnome-3.6
git tree:
fb9b223 Encode also message_uid in e_mail_part_build_uri()
9018705 Revert "Decode EMailRequest::priv::uri_base URI-escaped letters"
285d428 MailFolderCache: Silently ignore cancellation errors.
ebc86ad Decode EMailRequest::priv::uri_base URI-escaped letters
96777ce Bug #310978 - USENET always requires authentication
8c81665 GN-bug #685262 - Attachments disappear when dragged in message preview
aea55dd Do not crash in create_default_shell()
031f8b2 Bug #686278 - Prefer-plain can break parts list
d731853 Bug #663844 - [CalDAV] calendar-home-set/href may contain full URI
366a9d1 evolution.convert: Remove leftover "force-message-limit" entry.
f7763ba Bug 685786 - EWebView: Signal handlers never disconnected
6bbe980 EWebView cleanups.
96d29a6 EMailDisplay cleanups.
Added:
experimental/evolution/debian/patches/0201-EMailDisplay-cleanups.patch
experimental/evolution/debian/patches/0202-EWebView-cleanups.patch
experimental/evolution/debian/patches/0203-Bug-685786-EWebView-Signal-handlers-never-disconnect.patch
experimental/evolution/debian/patches/0204-evolution.convert-Remove-leftover-force-message-limi.patch
experimental/evolution/debian/patches/0205-Bug-663844-CalDAV-calendar-home-set-href-may-contain.patch
experimental/evolution/debian/patches/0206-Bug-686278-Prefer-plain-can-break-parts-list.patch
experimental/evolution/debian/patches/0207-Do-not-crash-in-create_default_shell.patch
experimental/evolution/debian/patches/0208-GN-bug-685262-Attachments-disappear-when-dragged-in-.patch
experimental/evolution/debian/patches/0209-Bug-310978-USENET-always-requires-authentication.patch
experimental/evolution/debian/patches/0210-Decode-EMailRequest-priv-uri_base-URI-escaped-letter.patch
experimental/evolution/debian/patches/0211-MailFolderCache-Silently-ignore-cancellation-errors.patch
experimental/evolution/debian/patches/0212-Revert-Decode-EMailRequest-priv-uri_base-URI-escaped.patch
experimental/evolution/debian/patches/0213-Encode-also-message_uid-in-e_mail_part_build_uri.patch
Modified:
experimental/evolution/debian/changelog
experimental/evolution/debian/control
experimental/evolution/debian/patches/series
Modified: experimental/evolution/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/changelog?rev=2289&op=diff
==============================================================================
--- experimental/evolution/debian/changelog (original)
+++ experimental/evolution/debian/changelog Thu Oct 18 20:41:10 2012
@@ -1,3 +1,25 @@
+evolution (3.6.1-1) experimental; urgency=low
+
+ * New upstream release
+ * debian/patches/02*.patch:
+ + Added. post-release 3.6.1 relese patches from the evo gnome-3.6
+ git tree:
+ fb9b223 Encode also message_uid in e_mail_part_build_uri()
+ 9018705 Revert "Decode EMailRequest::priv::uri_base URI-escaped letters"
+ 285d428 MailFolderCache: Silently ignore cancellation errors.
+ ebc86ad Decode EMailRequest::priv::uri_base URI-escaped letters
+ 96777ce Bug #310978 - USENET always requires authentication
+ 8c81665 GN-bug #685262 - Attachments disappear when dragged in message preview
+ aea55dd Do not crash in create_default_shell()
+ 031f8b2 Bug #686278 - Prefer-plain can break parts list
+ d731853 Bug #663844 - [CalDAV] calendar-home-set/href may contain full URI
+ 366a9d1 evolution.convert: Remove leftover "force-message-limit" entry.
+ f7763ba Bug 685786 - EWebView: Signal handlers never disconnected
+ 6bbe980 EWebView cleanups.
+ 96d29a6 EMailDisplay cleanups.
+
+ -- Sjoerd Simons <sjoerd at debian.org> Thu, 18 Oct 2012 22:41:05 +0200
+
evolution (3.6.0-1) experimental; urgency=low
* New upstream release
Modified: experimental/evolution/debian/control
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/control?rev=2289&op=diff
==============================================================================
--- experimental/evolution/debian/control (original)
+++ experimental/evolution/debian/control Thu Oct 18 20:41:10 2012
@@ -23,12 +23,12 @@
libglib2.0-dev (>= 2.32),
libgtk-3-dev (>= 3.4.0),
libgail-3-dev (>= 3.0.2),
- libebook1.2-dev (>= 3.5.90),
- libecal1.2-dev (>= 3.5.90),
- libedataserver1.2-dev (>= 3.5.90),
- libedataserverui-3.0-dev (>= 3.5.90),
- libebackend1.2-dev (>= 3.5.90),
- libcamel1.2-dev (>= 3.5.90),
+ libebook1.2-dev (>= 3.6.1),
+ libecal1.2-dev (>= 3.6.1),
+ libedataserver1.2-dev (>= 3.6.1),
+ libedataserverui-3.0-dev (>= 3.6.1),
+ libebackend1.2-dev (>= 3.6.1),
+ libcamel1.2-dev (>= 3.6.1),
evolution-data-server-dev (>= 3.6),
evolution-data-server-dev (<< 3.7),
libgtkhtml-4.0-dev (>= 4.5.2),
Added: experimental/evolution/debian/patches/0201-EMailDisplay-cleanups.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0201-EMailDisplay-cleanups.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0201-EMailDisplay-cleanups.patch (added)
+++ experimental/evolution/debian/patches/0201-EMailDisplay-cleanups.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,1651 @@
+From 96d29a68d37f0ba9c62b495e83014bc67c5261c7 Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes at redhat.com>
+Date: Sat, 13 Oct 2012 20:00:26 -0400
+Subject: [PATCH 201/213] EMailDisplay cleanups.
+
+(cherry picked from commit b5cf4dc325b810f750f735eb972837953f4e8309)
+---
+ mail/e-mail-display.c | 897 +++++++++++++++++++++++++------------------------
+ 1 file changed, 467 insertions(+), 430 deletions(-)
+
+diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
+index f027e8f..82934ea 100644
+--- a/mail/e-mail-display.c
++++ b/mail/e-mail-display.c
+@@ -68,7 +68,7 @@ struct _EMailDisplayPrivate {
+ gboolean headers_collapsable;
+ gboolean headers_collapsed;
+
+- gint force_image_load: 1;
++ gint force_image_load: 1;
+
+ GSettings *settings;
+
+@@ -154,84 +154,14 @@ static GtkActionEntry mailto_entries[] = {
+
+ static GtkActionEntry image_entries[] = {
+
+- { "image-save",
+- GTK_STOCK_SAVE,
+- N_("Save _Image..."),
+- NULL,
+- N_("Save the image to a file"),
+- NULL /* Handled by EMailReader */ },
+-
++ { "image-save",
++ GTK_STOCK_SAVE,
++ N_("Save _Image..."),
++ NULL,
++ N_("Save the image to a file"),
++ NULL /* Handled by EMailReader */ },
+ };
+
+-static gboolean
+-mail_display_button_press_event (GtkWidget *widget,
+- GdkEventButton *event)
+-{
+- WebKitHitTestResult *hit_test;
+- WebKitHitTestResultContext context;
+- gchar *image_src;
+- gboolean visible;
+- GtkAction *action;
+- GList *extensions, *iter;
+- EWebView *web_view = E_WEB_VIEW (widget);
+-
+- if (event->button != 3) {
+- return GTK_WIDGET_CLASS (
+- e_mail_display_parent_class)->button_press_event (
+- widget, event);
+- }
+-
+- hit_test = webkit_web_view_get_hit_test_result (
+- WEBKIT_WEB_VIEW (web_view), event);
+-
+- g_object_get (
+- G_OBJECT (hit_test),
+- "context", &context,
+- "image-uri", &image_src,
+- NULL);
+-
+- if ((context & WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE)) {
+- 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);
+-
+- visible = image_stream != NULL;
+-
+- if (image_stream)
+- g_object_unref (image_stream);
+- }
+-
+- if (image_src)
+- g_free (image_src);
+-
+- action = e_web_view_get_action (web_view, "image-save");
+- if (action)
+- gtk_action_set_visible (action, visible);
+- }
+-
+- extensions = e_extensible_list_extensions (
+- E_EXTENSIBLE (web_view), E_TYPE_EXTENSION);
+- for (iter = extensions; iter; iter = g_list_next (iter)) {
+- EExtension *extension = iter->data;
+-
+- if (!E_IS_MAIL_DISPLAY_POPUP_EXTENSION (extension))
+- continue;
+-
+- e_mail_display_popup_extension_update_actions (
+- E_MAIL_DISPLAY_POPUP_EXTENSION (extension), hit_test);
+- }
+- g_list_free (extensions);
+-
+- g_object_unref (hit_test);
+-
+- /* Chain up to parent's button_press_event() method. */
+- return GTK_WIDGET_CLASS (e_mail_display_parent_class)->button_press_event (widget, event);
+-}
+-
+ static void
+ formatter_image_loading_policy_changed_cb (GObject *object,
+ GParamSpec *pspec,
+@@ -242,11 +172,11 @@ formatter_image_loading_policy_changed_cb (GObject *object,
+ EMailImageLoadingPolicy policy;
+
+ policy = e_mail_formatter_get_image_loading_policy (formatter);
+- if (policy == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS) {
++
++ if (policy == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS)
+ e_mail_display_load_images (display);
+- } else {
++ else
+ e_mail_display_reload (display);
+- }
+ }
+
+ static void
+@@ -255,7 +185,7 @@ mail_display_update_formatter_colors (EMailDisplay *display)
+ GtkStyle *style;
+ GtkStateType state;
+
+- if (!display->priv->formatter)
++ if (display->priv->formatter == NULL)
+ return;
+
+ style = gtk_widget_get_style (GTK_WIDGET (display));
+@@ -265,143 +195,25 @@ mail_display_update_formatter_colors (EMailDisplay *display)
+
+ static void
+ mail_display_plugin_widget_disconnect_children (GtkWidget *widget,
+- gpointer mail_display)
++ gpointer mail_display)
+ {
+ g_signal_handlers_disconnect_by_data (widget, mail_display);
+ }
+
+ static void
+ mail_display_plugin_widget_disconnect (gpointer widget_uri,
+- gpointer widget,
+- gpointer mail_display)
++ gpointer widget,
++ gpointer mail_display)
+ {
+- if (E_IS_ATTACHMENT_BAR (widget) ||
+- E_IS_ATTACHMENT_BUTTON (widget)) {
++ if (E_IS_ATTACHMENT_BAR (widget))
+ g_signal_handlers_disconnect_by_data (widget, mail_display);
+- } else if (GTK_IS_CONTAINER (widget)) {
+- gtk_container_foreach (widget, mail_display_plugin_widget_disconnect_children, mail_display);
+- }
+-}
+-
+-static void
+-mail_display_constructed (GObject *object)
+-{
+- e_extensible_load_extensions (E_EXTENSIBLE (object));
+-
+- /* Chain up to parent's constructed() method. */
+- G_OBJECT_CLASS (e_mail_display_parent_class)->constructed (object);
+-}
+-
+-static void
+-mail_display_set_property (GObject *object,
+- guint property_id,
+- const GValue *value,
+- GParamSpec *pspec)
+-{
+- switch (property_id) {
+- case PROP_PART_LIST:
+- e_mail_display_set_parts_list (
+- E_MAIL_DISPLAY (object),
+- g_value_get_pointer (value));
+- return;
+- case PROP_MODE:
+- e_mail_display_set_mode (
+- E_MAIL_DISPLAY (object),
+- g_value_get_int (value));
+- return;
+- case PROP_HEADERS_COLLAPSABLE:
+- e_mail_display_set_headers_collapsable (
+- E_MAIL_DISPLAY (object),
+- g_value_get_boolean (value));
+- return;
+- case PROP_HEADERS_COLLAPSED:
+- e_mail_display_set_headers_collapsed (
+- E_MAIL_DISPLAY (object),
+- g_value_get_boolean (value));
+- return;
+- }
+-
+- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+-}
+-
+-static void
+-mail_display_get_property (GObject *object,
+- guint property_id,
+- GValue *value,
+- GParamSpec *pspec)
+-{
+- switch (property_id) {
+- case PROP_PART_LIST:
+- g_value_set_pointer (
+- value, e_mail_display_get_parts_list (
+- E_MAIL_DISPLAY (object)));
+- return;
+- case PROP_MODE:
+- g_value_set_int (
+- value, e_mail_display_get_mode (
+- E_MAIL_DISPLAY (object)));
+- return;
+- case PROP_HEADERS_COLLAPSABLE:
+- g_value_set_boolean (
+- value, e_mail_display_get_headers_collapsable (
+- E_MAIL_DISPLAY (object)));
+- return;
+- case PROP_HEADERS_COLLAPSED:
+- g_value_set_boolean (
+- value, e_mail_display_get_headers_collapsed (
+- E_MAIL_DISPLAY (object)));
+- return;
+- }
+-
+- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+-}
+-
+-static void
+-mail_display_dispose (GObject *object)
+-{
+- EMailDisplayPrivate *priv;
+-
+- priv = E_MAIL_DISPLAY_GET_PRIVATE (object);
+-
+- if (priv->scheduled_reload > 0) {
+- g_source_remove (priv->scheduled_reload);
+- priv->scheduled_reload = 0;
+- }
+-
+- if (priv->widgets) {
+- g_hash_table_foreach (priv->widgets, mail_display_plugin_widget_disconnect, object);
+- g_hash_table_destroy (priv->widgets);
+- priv->widgets = NULL;
+- }
+-
+- g_clear_object (&priv->part_list);
+- g_clear_object (&priv->settings);
+- g_clear_object (&priv->formatter);
+-
+- /* Chain up to parent's dispose() method. */
+- G_OBJECT_CLASS (e_mail_display_parent_class)->dispose (object);
+-}
+-
+-static void
+-mail_display_realize (GtkWidget *widget)
+-{
+- /* Chain up to parent's realize() method. */
+- GTK_WIDGET_CLASS (e_mail_display_parent_class)->realize (widget);
+-
+- mail_display_update_formatter_colors (E_MAIL_DISPLAY (widget));
+-}
+-
+-static void
+-mail_display_style_set (GtkWidget *widget,
+- GtkStyle *previous_style)
+-{
+- EMailDisplay *display = E_MAIL_DISPLAY (widget);
+-
+- mail_display_update_formatter_colors (display);
+-
+- /* Chain up to parent's style_set() method. */
+- GTK_WIDGET_CLASS (e_mail_display_parent_class)->
+- style_set (widget, previous_style);
++ else if (E_IS_ATTACHMENT_BUTTON (widget))
++ g_signal_handlers_disconnect_by_data (widget, mail_display);
++ else if (GTK_IS_CONTAINER (widget))
++ gtk_container_foreach (
++ widget,
++ mail_display_plugin_widget_disconnect_children,
++ mail_display);
+ }
+
+ static gboolean
+@@ -440,6 +252,7 @@ mail_display_link_clicked (WebKitWebView *web_view,
+
+ if (g_str_has_prefix (uri, "file://")) {
+ gchar *filename;
++
+ filename = g_filename_from_uri (uri, NULL, NULL);
+
+ if (g_file_test (filename, G_FILE_TEST_IS_DIR)) {
+@@ -458,18 +271,18 @@ mail_display_link_clicked (WebKitWebView *web_view,
+ return TRUE;
+
+ } else if (g_ascii_strncasecmp (uri, "thismessage:", 12) == 0) {
+- /* ignore */ ;
++ /* ignore */
+ webkit_web_policy_decision_ignore (policy_decision);
+ return TRUE;
+
+ } else if (g_ascii_strncasecmp (uri, "cid:", 4) == 0) {
+- /* ignore */ ;
++ /* ignore */
+ webkit_web_policy_decision_ignore (policy_decision);
+ return TRUE;
+
+ }
+
+- /* Let webkit handle it */
++ /* Let WebKit handle it. */
+ return FALSE;
+ }
+
+@@ -479,12 +292,10 @@ webkit_request_load_from_file (WebKitNetworkRequest *request,
+ {
+ gchar *data = NULL;
+ gsize length = 0;
+- gboolean status;
+ gchar *b64, *new_uri;
+ gchar *ct;
+
+- status = g_file_get_contents (path, &data, &length, NULL);
+- if (!status)
++ if (!g_file_get_contents (path, &data, &length, NULL))
+ return;
+
+ b64 = g_base64_encode ((guchar *) data, length);
+@@ -512,15 +323,15 @@ mail_display_resource_requested (WebKitWebView *web_view,
+ const gchar *uri = webkit_network_request_get_uri (request);
+
+ part_list = display->priv->part_list;
+- if (!part_list) {
++ if (part_list == NULL)
+ return;
+- }
+
+- /* Redirect cid:part_id to mail://mail_id/cid:part_id */
++ /* Redirect cid:part_id to mail://mail_id/cid:part_id */
+ if (g_str_has_prefix (uri, "cid:")) {
++ gchar *new_uri;
+
+- /* Always write raw content of CID object */
+- gchar *new_uri = e_mail_part_build_uri (
++ /* Always write raw content of CID object. */
++ new_uri = e_mail_part_build_uri (
+ part_list->folder, part_list->message_uid,
+ "part_id", G_TYPE_STRING, uri,
+ "mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW, NULL);
+@@ -529,23 +340,22 @@ mail_display_resource_requested (WebKitWebView *web_view,
+
+ g_free (new_uri);
+
+- /* WebKit won't allow to load a local file when displaing "remote" mail://,
+- protocol, so we need to handle this manually */
++ /* WebKit won't allow to load a local file when displaying
++ * "remote" mail:// protocol, so we need to handle this manually. */
+ } else if (g_str_has_prefix (uri, "file:")) {
+ gchar *path;
+
+ path = g_filename_from_uri (uri, NULL, NULL);
+- if (!path)
++ if (path == NULL)
+ return;
+
+ webkit_request_load_from_file (request, path);
+
+ g_free (path);
+
+- /* Redirect http(s) request to evo-http(s) protocol. See EMailRequest for
+- * further details about this. */
++ /* 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")) {
+-
+ gchar *new_uri, *mail_uri, *enc;
+ SoupURI *soup_uri;
+ GHashTable *query;
+@@ -553,17 +363,18 @@ mail_display_resource_requested (WebKitWebView *web_view,
+ CamelStream *stream;
+ EMailImageLoadingPolicy image_policy;
+
+- /* Open Evolution's cache */
+- uri_md5 = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
++ /* 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
+- * then redirect to invalid URI, so that webkit would display
+- * a native placeholder for it. */
++ /* If the URI is not cached and we are not allowed to load it
++ * then redirect to invalid URI, so that webkit would display
++ * a native placeholder for it. */
+ image_policy = e_mail_formatter_get_image_loading_policy (
+- display->priv->formatter);
++ display->priv->formatter);
+ if (!stream && !display->priv->force_image_load &&
+ (image_policy == E_MAIL_IMAGE_LOADING_POLICY_NEVER)) {
+ webkit_network_request_set_uri (request, "about:blank");
+@@ -576,13 +387,12 @@ mail_display_resource_requested (WebKitWebView *web_view,
+ part_list->message_uid, NULL, NULL);
+
+ soup_uri = soup_uri_new (new_uri);
+- if (soup_uri->query) {
++ if (soup_uri->query)
+ query = soup_form_decode (soup_uri->query);
+- } else {
++ else
+ 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);
+
+@@ -613,33 +423,34 @@ find_element_by_id (WebKitDOMDocument *document,
+ {
+ WebKitDOMNodeList *frames;
+ WebKitDOMElement *element;
+- gulong i, length;
++ gulong ii, length;
+
+ if (!WEBKIT_DOM_IS_DOCUMENT (document))
+ return NULL;
+
+- /* Try to look up the element in this DOM document */
++ /* Try to look up the element in this DOM document */
+ element = webkit_dom_document_get_element_by_id (document, id);
+- if (element)
++ if (element != NULL)
+ return element;
+
+- /* If the element is not here then recursively scan all frames */
+- frames = webkit_dom_document_get_elements_by_tag_name (document, "iframe");
++ /* If the element is not here then recursively scan all frames */
++ 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++) {
++ for (ii = 0; ii < length; ii++) {
++ WebKitDOMHTMLIFrameElement *iframe;
++ WebKitDOMDocument *frame_doc;
++ WebKitDOMElement *element;
+
+- WebKitDOMHTMLIFrameElement *iframe =
+- WEBKIT_DOM_HTML_IFRAME_ELEMENT (
+- webkit_dom_node_list_item (frames, i));
++ iframe = WEBKIT_DOM_HTML_IFRAME_ELEMENT (
++ webkit_dom_node_list_item (frames, ii));
+
+- WebKitDOMDocument *frame_doc =
+- webkit_dom_html_iframe_element_get_content_document (iframe);
++ frame_doc = webkit_dom_html_iframe_element_get_content_document (iframe);
+
+- WebKitDOMElement *el =
+- find_element_by_id (frame_doc, id);
++ element = find_element_by_id (frame_doc, id);
+
+- if (el)
+- return el;
++ if (element != NULL)
++ return element;
+ }
+
+ return NULL;
+@@ -657,7 +468,7 @@ mail_display_plugin_widget_resize (GtkWidget *widget,
+
+ parent_element = g_object_get_data (G_OBJECT (widget), "parent_element");
+
+- if (!parent_element || !WEBKIT_DOM_IS_ELEMENT (parent_element)) {
++ if (!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")));
+@@ -676,11 +487,11 @@ mail_display_plugin_widget_resize (GtkWidget *widget,
+ * WebKit to go crazy when zooming. */
+ height = height * (1 / scale);
+
+- /* Int -> Str */
++ /* Int -> Str */
+ dim = g_strdup_printf ("%d", height);
+
+- /* Set height of the containment <object> to match height of the
+- * GtkWidget it contains */
++ /* Set height of the containment <object> to match height of the
++ * GtkWidget it contains */
+ webkit_dom_html_object_element_set_height (
+ WEBKIT_DOM_HTML_OBJECT_ELEMENT (parent_element), dim);
+ g_free (dim);
+@@ -690,7 +501,7 @@ static void
+ mail_display_plugin_widget_realize_cb (GtkWidget *widget,
+ gpointer user_data)
+ {
+- WebKitDOMHTMLElement *el;
++ WebKitDOMHTMLElement *element;
+
+ if (GTK_IS_BOX (widget)) {
+ GList *children;
+@@ -705,18 +516,18 @@ mail_display_plugin_widget_realize_cb (GtkWidget *widget,
+ }
+
+ /* First check if we are actually supposed to be visible */
+- el = g_object_get_data (G_OBJECT (widget), "parent_element");
+- if (!el || !WEBKIT_DOM_IS_HTML_ELEMENT (el)) {
++ element = g_object_get_data (G_OBJECT (widget), "parent_element");
++ if (element == NULL || !WEBKIT_DOM_IS_HTML_ELEMENT (element)) {
+ g_warning ("UAAAAA");
+ } else {
+- if (webkit_dom_html_element_get_hidden (el)) {
++ if (webkit_dom_html_element_get_hidden (element)) {
+ gtk_widget_hide (widget);
+ return;
+ }
+ }
+
+- /* Initial resize of the <object> element when the widget
+- * is displayed for the first time. */
++ /* Initial resize of the <object> element when the widget
++ * is displayed for the first time. */
+ mail_display_plugin_widget_resize (widget, NULL, user_data);
+ }
+
+@@ -729,19 +540,19 @@ plugin_widget_set_parent_element (GtkWidget *widget,
+ WebKitDOMElement *element;
+
+ uri = g_object_get_data (G_OBJECT (widget), "uri");
+- if (!uri || !*uri)
++ if (uri == NULL || *uri == '\0')
+ return;
+
+ document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (display));
+ element = find_element_by_id (document, uri);
+
+- if (!element || !WEBKIT_DOM_IS_ELEMENT (element)) {
++ if (!WEBKIT_DOM_IS_ELEMENT (element)) {
+ 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 */
++ /* 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);
+
+@@ -757,24 +568,20 @@ toggle_widget_visibility (EAttachmentButton *button,
+ EMailDisplay *display,
+ WebKitDOMElement *element)
+ {
++ GtkWidget *widget = NULL;
+ gchar *id;
+- GtkWidget *widget;
+
+ id = webkit_dom_html_element_get_id (WEBKIT_DOM_HTML_ELEMENT (element));
+- if (!id || !*id) {
++ if (id == NULL || *id == '\0')
+ return;
+- }
+
+- if (!display->priv->widgets) {
+- g_free (id);
+- return;
+- }
++ if (display->priv->widgets != NULL)
++ widget = g_hash_table_lookup (display->priv->widgets, id);
+
+- widget = g_hash_table_lookup (display->priv->widgets, id);
+ g_free (id);
+- if (!widget) {
++
++ if (widget == NULL)
+ return;
+- }
+
+ /* If the widget encapsulates EAttachmentBar then check, whether
+ * the attachment bar is not empty. We want to display it only
+@@ -787,16 +594,15 @@ toggle_widget_visibility (EAttachmentButton *button,
+ EAttachmentStore *store;
+
+ store = e_attachment_bar_get_store (
+- E_ATTACHMENT_BAR (children->data));
++ E_ATTACHMENT_BAR (children->data));
+
+ g_list_free (children);
+
+ /* Don't allow to display such attachment bar,
+ * but always allow to hide it */
+ if (e_attachment_button_get_expanded (button) &&
+- (e_attachment_store_get_num_attachments (store) == 0)) {
++ (e_attachment_store_get_num_attachments (store) == 0))
+ return;
+- }
+ }
+ }
+
+@@ -804,11 +610,10 @@ toggle_widget_visibility (EAttachmentButton *button,
+ WEBKIT_DOM_HTML_ELEMENT (element),
+ !e_attachment_button_get_expanded (button));
+
+- if (e_attachment_button_get_expanded (button)) {
++ if (e_attachment_button_get_expanded (button))
+ gtk_widget_show (widget);
+- } else {
++ else
+ gtk_widget_hide (widget);
+- }
+ }
+
+ /**
+@@ -823,13 +628,13 @@ bind_iframe_content_visibility (WebKitDOMElement *iframe,
+ {
+ WebKitDOMDocument *document;
+ WebKitDOMNodeList *nodes;
+- gulong i, length;
++ gulong ii, length;
+
+- if (!iframe || !WEBKIT_DOM_IS_HTML_IFRAME_ELEMENT (iframe))
++ if (!WEBKIT_DOM_IS_HTML_IFRAME_ELEMENT (iframe))
+ return;
+
+ document = webkit_dom_html_iframe_element_get_content_document (
+- WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe));
++ WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe));
+ if (!WEBKIT_DOM_IS_DOCUMENT (document))
+ return;
+
+@@ -838,19 +643,20 @@ bind_iframe_content_visibility (WebKitDOMElement *iframe,
+
+ d ({
+ gchar *name = webkit_dom_html_iframe_element_get_name (
+- WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe));
++ WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe));
+ printf ("Found %ld objects within iframe %s\n", length, name);
+ g_free (name);
+ });
+
+- /* Iterate through all <object>s and bind visibility of their widget
+- * with expanded-state of related attachment button */
+- for (i = 0; i < length; i++) {
++ /* Iterate through all <object>s and bind visibility of their widget
++ * with expanded-state of related attachment button */
++ for (ii = 0; ii < length; ii++) {
+
+- WebKitDOMNode *node = webkit_dom_node_list_item (nodes, i);
++ WebKitDOMNode *node = webkit_dom_node_list_item (nodes, ii);
+
+ /* Initial sync */
+- toggle_widget_visibility (button, display, WEBKIT_DOM_ELEMENT (node));
++ toggle_widget_visibility (
++ button, display, WEBKIT_DOM_ELEMENT (node));
+ }
+ }
+
+@@ -872,11 +678,13 @@ attachment_button_expanded (GObject *object,
+ (gchar *) g_object_get_data (object, "uri"),
+ (e_attachment_button_get_expanded (button) ? "expanded" : "collapsed")));
+
+- expanded = e_attachment_button_get_expanded (button) &&
+- gtk_widget_get_visible (GTK_WIDGET (button));
++ expanded =
++ e_attachment_button_get_expanded (button) &&
++ gtk_widget_get_visible (GTK_WIDGET (button));
+
+ document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (display));
+- element = find_element_by_id (document, g_object_get_data (object, "attachment_id"));
++ element = find_element_by_id (
++ document, g_object_get_data (object, "attachment_id"));
+
+ if (!WEBKIT_DOM_IS_ELEMENT (element)) {
+ d (
+@@ -885,12 +693,15 @@ attachment_button_expanded (GObject *object,
+ return;
+ }
+
+- /* Show or hide the DIV which contains the attachment (iframe, image...) */
++ /* Show or hide the DIV which contains
++ * the attachment (iframe, image...). */
+ css = webkit_dom_element_get_style (element);
+ webkit_dom_css_style_declaration_set_property (
+ css, "display", expanded ? "block" : "none", "", NULL);
+
+- id = g_strconcat (g_object_get_data (object, "attachment_id"), ".iframe", NULL);
++ id = g_strconcat (
++ g_object_get_data (object, "attachment_id"),
++ ".iframe", NULL);
+ element = find_element_by_id (document, id);
+ g_free (id);
+
+@@ -945,55 +756,55 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+ gchar *part_id, *type, *object_uri;
+
+ part_id = g_hash_table_lookup (param, "data");
+- if (!part_id || !g_str_has_prefix (uri, "mail://"))
++ if (part_id == NULL || !g_str_has_prefix (uri, "mail://"))
+ return NULL;
+
+ type = g_hash_table_lookup (param, "type");
+- if (!type)
++ if (type == NULL)
+ return NULL;
+
+ display = E_MAIL_DISPLAY (web_view);
+
+- if ((widget = g_hash_table_lookup (display->priv->widgets, part_id)) != NULL) {
++ widget = g_hash_table_lookup (display->priv->widgets, part_id);
++ if (widget != NULL) {
+ d (printf ("Handeled %s widget request from cache\n", part_id));
+ return widget;
+ }
+
+- /* Findt EMailPart representing requested widget */
++ /* Find the EMailPart representing the requested widget. */
+ part = e_mail_part_list_find_part (display->priv->part_list, part_id);
+- if (!part) {
++ if (part == NULL)
+ return NULL;
+- }
+
+ reg = e_mail_formatter_get_extension_registry (display->priv->formatter);
+ extensions = e_mail_extension_registry_get_for_mime_type (reg, type);
+- if (!extensions)
++ if (extensions == NULL)
+ return NULL;
+
+ extension = NULL;
+ for (iter = g_queue_peek_head_link (extensions); iter; iter = iter->next) {
+
+ extension = iter->data;
+- if (!extension)
++ if (extension == NULL)
+ continue;
+
+ if (e_mail_formatter_extension_has_widget (extension))
+ break;
+ }
+
+- if (!extension)
++ if (extension == NULL)
+ return NULL;
+
+ /* Get the widget from formatter */
+ widget = e_mail_formatter_extension_get_widget (
+- extension, display->priv->part_list, part, param);
++ extension, display->priv->part_list, part, param);
+ d (
+ printf ("Created widget %s (%p) for part %s\n",
+ G_OBJECT_TYPE_NAME (widget), widget, part_id));
+
+- /* Should not happen! WebKit will display an ugly 'Plug-in not available'
+- * placeholder instead of hiding the <object> element */
+- if (!widget)
++ /* Should not happen! WebKit will display an ugly 'Plug-in not
++ * available' placeholder instead of hiding the <object> element. */
++ if (widget == NULL)
+ return NULL;
+
+ /* Attachment button has URI different then the actual PURI because
+@@ -1007,10 +818,12 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+ else
+ attachment_part_id = part_id;
+
+- object_uri = g_strconcat (attachment_part_id, ".attachment_button", NULL);
++ object_uri = g_strconcat (
++ attachment_part_id, ".attachment_button", NULL);
+ g_object_set_data_full (
+ G_OBJECT (widget), "attachment_id",
+- g_strdup (attachment_part_id), (GDestroyNotify) g_free);
++ g_strdup (attachment_part_id),
++ (GDestroyNotify) g_free);
+ } else {
+ object_uri = g_strdup (part_id);
+ }
+@@ -1020,13 +833,13 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+ G_OBJECT (widget), "uri",
+ object_uri, (GDestroyNotify) g_free);
+
+- /* Set pointer to the <object> element as GObject data "parent_element"
+- * and set pointer to the widget as GObject data "widget" to the <object>
+- * element */
++ /* Set pointer to the <object> element as GObject data
++ * "parent_element" and set pointer to the widget as GObject
++ * data "widget" to the <object> element. */
+ plugin_widget_set_parent_element (widget, display);
+
+- /* Resizing a GtkWidget requires changing size of parent
+- * <object> HTML element in DOM. */
++ /* Resizing a GtkWidget requires changing size of parent
++ * <object> HTML element in DOM. */
+ g_signal_connect (
+ widget, "realize",
+ G_CALLBACK (mail_display_plugin_widget_realize_cb), display);
+@@ -1038,25 +851,28 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+ GtkWidget *box = NULL;
+ EAttachmentStore *store;
+
+- /* Only when packed in box (grid does not work),
++ /* Only when packed in box (grid does not work),
+ * EAttachmentBar reports correct height */
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_pack_start (GTK_BOX (box), widget, TRUE, TRUE, 0);
+
+- /* When EAttachmentBar is expanded/collapsed it does not
+- * emit size-allocate signal despite it changes it's height. */
++ /* When EAttachmentBar is expanded/collapsed it does not
++ * emit size-allocate signal despite it changes it's height. */
+ g_signal_connect (
+ widget, "notify::expanded",
+- G_CALLBACK (mail_display_plugin_widget_resize), display);
++ G_CALLBACK (mail_display_plugin_widget_resize),
++ display);
+ g_signal_connect (
+ widget, "notify::active-view",
+- G_CALLBACK (mail_display_plugin_widget_resize), display);
++ G_CALLBACK (mail_display_plugin_widget_resize),
++ display);
+
+ /* Always hide an attachment bar without attachments */
+ store = e_attachment_bar_get_store (E_ATTACHMENT_BAR (widget));
+ g_signal_connect (
+ store, "notify::num-attachments",
+- G_CALLBACK (mail_display_attachment_count_changed), box);
++ G_CALLBACK (mail_display_attachment_count_changed),
++ box);
+
+ gtk_widget_show (widget);
+ gtk_widget_show (box);
+@@ -1068,9 +884,9 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+
+ } else if (E_IS_ATTACHMENT_BUTTON (widget)) {
+
+- /* Bind visibility of DOM element containing related
+- * attachment with 'expanded' property of this
+- * attachment button. */
++ /* Bind visibility of DOM element containing related
++ * attachment with 'expanded' property of this
++ * attachment button. */
+ WebKitDOMElement *attachment;
+ WebKitDOMDocument *document;
+ EMailPartAttachment *empa = (EMailPartAttachment *) part;
+@@ -1081,13 +897,14 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+ else
+ attachment_part_id = part_id;
+
+- /* Find attachment-wrapper div which contains the content of the
+- * attachment (iframe) */
+- document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (display));
++ /* Find attachment-wrapper div which contains
++ * the content of the attachment (iframe). */
++ document = webkit_web_view_get_dom_document (
++ WEBKIT_WEB_VIEW (display));
+ attachment = find_element_by_id (document, attachment_part_id);
+
+ /* None found? Attachment cannot be expanded */
+- if (!attachment) {
++ if (attachment == NULL) {
+ e_attachment_button_set_expandable (
+ E_ATTACHMENT_BUTTON (widget), FALSE);
+ } else {
+@@ -1097,17 +914,19 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
+ E_ATTACHMENT_BUTTON (widget), TRUE);
+
+ /* Show/hide the attachment when the EAttachmentButton
+- * * is expanded/collapsed or shown/hidden */
++ * is expanded/collapsed or shown/hidden. */
+ g_signal_connect (
+ widget, "notify::expanded",
+- G_CALLBACK (attachment_button_expanded), display);
++ G_CALLBACK (attachment_button_expanded),
++ display);
+ g_signal_connect (
+ widget, "notify::visible",
+- G_CALLBACK (attachment_button_expanded), display);
++ G_CALLBACK (attachment_button_expanded),
++ display);
+
+- /* Automatically expand attachments that have inline
+- * disposition or the EMailParts have specific force_inline
+- * flag set */
++ /* Automatically expand attachments that have inline
++ * disposition or the EMailParts have specific
++ * force_inline flag set. */
+ disposition =
+ camel_mime_part_get_content_disposition (part->part);
+ if (!part->force_collapse &&
+@@ -1151,19 +970,19 @@ toggle_headers_visibility (WebKitDOMElement *button,
+
+ short_headers = webkit_dom_document_get_element_by_id (
+ document, "__evo-short-headers");
+- if (!short_headers)
++ if (short_headers == NULL)
+ return;
+
+ css_short = webkit_dom_element_get_style (short_headers);
+
+ full_headers = webkit_dom_document_get_element_by_id (
+ document, "__evo-full-headers");
+- if (!full_headers)
++ if (full_headers == NULL)
+ return;
+
+ css_full = webkit_dom_element_get_style (full_headers);
+ css_value = webkit_dom_css_style_declaration_get_property_value (
+- css_full, "display");
++ css_full, "display");
+ expanded = (g_strcmp0 (css_value, "block") == 0);
+ g_free (css_value);
+
+@@ -1182,7 +1001,8 @@ toggle_headers_visibility (WebKitDOMElement *button,
+ 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);
++ e_mail_display_set_headers_collapsed (
++ E_MAIL_DISPLAY (web_view), expanded);
+
+ d (printf ("Headers %s!\n", expanded ? "collapsed" : "expanded"));
+ }
+@@ -1201,13 +1021,14 @@ toggle_address_visibility (WebKitDOMElement *button,
+ const gchar *path;
+ gboolean expanded;
+
+- document = webkit_dom_node_get_owner_document (WEBKIT_DOM_NODE (button));
++ document = webkit_dom_node_get_owner_document (
++ WEBKIT_DOM_NODE (button));
+
+ id = g_strconcat ("__evo-moreaddr-", address, NULL);
+ full_addr = webkit_dom_document_get_element_by_id (document, id);
+ g_free (id);
+
+- if (!full_addr)
++ if (full_addr == NULL)
+ return;
+
+ css_full = webkit_dom_element_get_style (full_addr);
+@@ -1216,7 +1037,7 @@ toggle_address_visibility (WebKitDOMElement *button,
+ ellipsis = webkit_dom_document_get_element_by_id (document, id);
+ g_free (id);
+
+- if (!ellipsis)
++ if (ellipsis == NULL)
+ return;
+
+ css_ellipsis = webkit_dom_element_get_style (ellipsis);
+@@ -1230,18 +1051,17 @@ toggle_address_visibility (WebKitDOMElement *button,
+ webkit_dom_css_style_declaration_set_property (
+ css_ellipsis, "display", (expanded ? "inline" : "none"), "", NULL);
+
+- if (expanded) {
++ if (expanded)
+ path = "evo-file://" EVOLUTION_IMAGESDIR "/plus.png";
+- } else {
++ else
+ path = "evo-file://" EVOLUTION_IMAGESDIR "/minus.png";
+- }
+
+ if (!WEBKIT_DOM_IS_HTML_IMAGE_ELEMENT (button)) {
+ id = g_strconcat ("__evo-moreaddr-img-", address, NULL);
+ button = webkit_dom_document_get_element_by_id (document, id);
+ g_free (id);
+
+- if (!button)
++ if (button == NULL)
+ return;
+ }
+
+@@ -1260,7 +1080,7 @@ setup_DOM_bindings (GObject *object,
+ WebKitLoadStatus load_status;
+ WebKitDOMDocument *document;
+ WebKitDOMElement *button;
+- gint i = 0;
++ gint ii = 0;
+
+ frame = WEBKIT_WEB_FRAME (object);
+ load_status = webkit_web_frame_get_load_status (frame);
+@@ -1271,38 +1091,40 @@ 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");
+- if (button) {
++ document, "__evo-collapse-headers-img");
++ if (button != NULL)
+ webkit_dom_event_target_add_event_listener (
+ WEBKIT_DOM_EVENT_TARGET (button), "click",
+- G_CALLBACK (toggle_headers_visibility), FALSE, web_view);
+- }
++ G_CALLBACK (toggle_headers_visibility),
++ FALSE, web_view);
+
+- for (i = 0; i < 3; i++) {
++ for (ii = 0; ii < 3; ii++) {
+ gchar *id;
+- id = g_strconcat ("__evo-moreaddr-img-", addresses[i], NULL);
++
++ id = g_strconcat ("__evo-moreaddr-img-", addresses[ii], NULL);
+ button = webkit_dom_document_get_element_by_id (document, id);
+ g_free (id);
+
+- if (!button)
++ if (button == NULL)
+ continue;
+
+ webkit_dom_event_target_add_event_listener (
+ WEBKIT_DOM_EVENT_TARGET (button), "click",
+ G_CALLBACK (toggle_address_visibility), FALSE,
+- (gpointer) addresses[i]);
++ (gpointer) addresses[ii]);
+
+- id = g_strconcat ("__evo-moreaddr-ellipsis-", addresses[i], NULL);
++ id = g_strconcat (
++ "__evo-moreaddr-ellipsis-", addresses[ii], NULL);
+ button = webkit_dom_document_get_element_by_id (document, id);
+ g_free (id);
+
+- if (!button)
++ if (button == NULL)
+ continue;
+
+ webkit_dom_event_target_add_event_listener (
+ WEBKIT_DOM_EVENT_TARGET (button), "click",
+ G_CALLBACK (toggle_address_visibility), FALSE,
+- (gpointer) addresses[i]);
++ (gpointer) addresses[ii]);
+ }
+ }
+
+@@ -1331,13 +1153,14 @@ mail_parts_bind_dom (GObject *object,
+ return;
+
+ frame_name = webkit_web_frame_get_name (frame);
+- if (!frame_name || !*frame_name)
++ if (frame_name == NULL || *frame_name == '\0')
+ frame_name = ".message.headers";
+
+ for (iter = display->priv->part_list->list; iter; iter = iter->next) {
+
+ EMailPart *part = iter->data;
+- if (!part)
++
++ if (part == NULL)
+ continue;
+
+ if (g_strcmp0 (part->id, frame_name) == 0)
+@@ -1345,23 +1168,26 @@ mail_parts_bind_dom (GObject *object,
+ }
+
+ document = webkit_web_view_get_dom_document (web_view);
+- while (iter) {
+-
++ while (iter != NULL) {
+ EMailPart *part = iter->data;
+- if (!part) {
++
++ if (part == NULL) {
+ iter = iter->next;
+ continue;
+ }
+
+- /* Iterate only the parts rendered in the frame and all it's subparts */
++ /* Iterate only the parts rendered in
++ * the frame and all it's subparts. */
+ if (!g_str_has_prefix (part->id, frame_name))
+ break;
+
+- if (part->bind_func) {
+- WebKitDOMElement *el = find_element_by_id (document, part->id);
+- if (el) {
++ if (part->bind_func != NULL) {
++ WebKitDOMElement *element;
++
++ element = find_element_by_id (document, part->id);
++ if (element != NULL) {
+ d (printf ("/*bind_func*/ for %s\n", part->id));
+- part->bind_func (part, el);
++ part->bind_func (part, element);
+ }
+ }
+
+@@ -1389,15 +1215,209 @@ mail_display_uri_changed (EMailDisplay *display,
+ {
+ d (printf ("EMailDisplay URI changed, recreating widgets hashtable\n"));
+
+- if (display->priv->widgets) {
+- g_hash_table_foreach (display->priv->widgets, mail_display_plugin_widget_disconnect, display);
++ if (display->priv->widgets != NULL) {
++ g_hash_table_foreach (
++ display->priv->widgets,
++ mail_display_plugin_widget_disconnect, display);
+ g_hash_table_destroy (display->priv->widgets);
+ }
+
+ display->priv->widgets = g_hash_table_new_full (
+- g_str_hash, g_str_equal,
+- (GDestroyNotify) g_free,
+- (GDestroyNotify) g_object_unref);
++ (GHashFunc) g_str_hash,
++ (GEqualFunc) g_str_equal,
++ (GDestroyNotify) g_free,
++ (GDestroyNotify) g_object_unref);
++}
++
++static void
++mail_display_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ switch (property_id) {
++ case PROP_PART_LIST:
++ e_mail_display_set_parts_list (
++ E_MAIL_DISPLAY (object),
++ g_value_get_pointer (value));
++ return;
++ case PROP_MODE:
++ e_mail_display_set_mode (
++ E_MAIL_DISPLAY (object),
++ g_value_get_int (value));
++ return;
++ case PROP_HEADERS_COLLAPSABLE:
++ e_mail_display_set_headers_collapsable (
++ E_MAIL_DISPLAY (object),
++ g_value_get_boolean (value));
++ return;
++ case PROP_HEADERS_COLLAPSED:
++ e_mail_display_set_headers_collapsed (
++ E_MAIL_DISPLAY (object),
++ g_value_get_boolean (value));
++ return;
++ }
++
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++}
++
++static void
++mail_display_get_property (GObject *object,
++ guint property_id,
++ GValue *value,
++ GParamSpec *pspec)
++{
++ switch (property_id) {
++ case PROP_PART_LIST:
++ g_value_set_pointer (
++ value, e_mail_display_get_parts_list (
++ E_MAIL_DISPLAY (object)));
++ return;
++ case PROP_MODE:
++ g_value_set_int (
++ value, e_mail_display_get_mode (
++ E_MAIL_DISPLAY (object)));
++ return;
++ case PROP_HEADERS_COLLAPSABLE:
++ g_value_set_boolean (
++ value, e_mail_display_get_headers_collapsable (
++ E_MAIL_DISPLAY (object)));
++ return;
++ case PROP_HEADERS_COLLAPSED:
++ g_value_set_boolean (
++ value, e_mail_display_get_headers_collapsed (
++ E_MAIL_DISPLAY (object)));
++ return;
++ }
++
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++}
++
++static void
++mail_display_dispose (GObject *object)
++{
++ EMailDisplayPrivate *priv;
++
++ priv = E_MAIL_DISPLAY_GET_PRIVATE (object);
++
++ if (priv->scheduled_reload > 0) {
++ g_source_remove (priv->scheduled_reload);
++ priv->scheduled_reload = 0;
++ }
++
++ if (priv->widgets != NULL) {
++ g_hash_table_foreach (
++ priv->widgets,
++ mail_display_plugin_widget_disconnect, object);
++ g_hash_table_destroy (priv->widgets);
++ priv->widgets = NULL;
++ }
++
++ g_clear_object (&priv->part_list);
++ g_clear_object (&priv->settings);
++ g_clear_object (&priv->formatter);
++
++ /* Chain up to parent's dispose() method. */
++ G_OBJECT_CLASS (e_mail_display_parent_class)->dispose (object);
++}
++
++static void
++mail_display_constructed (GObject *object)
++{
++ e_extensible_load_extensions (E_EXTENSIBLE (object));
++
++ /* Chain up to parent's constructed() method. */
++ G_OBJECT_CLASS (e_mail_display_parent_class)->constructed (object);
++}
++
++static void
++mail_display_realize (GtkWidget *widget)
++{
++ /* Chain up to parent's realize() method. */
++ GTK_WIDGET_CLASS (e_mail_display_parent_class)->realize (widget);
++
++ mail_display_update_formatter_colors (E_MAIL_DISPLAY (widget));
++}
++
++static void
++mail_display_style_set (GtkWidget *widget,
++ GtkStyle *previous_style)
++{
++ EMailDisplay *display = E_MAIL_DISPLAY (widget);
++
++ mail_display_update_formatter_colors (display);
++
++ /* Chain up to parent's style_set() method. */
++ GTK_WIDGET_CLASS (e_mail_display_parent_class)->
++ style_set (widget, previous_style);
++}
++
++static gboolean
++mail_display_button_press_event (GtkWidget *widget,
++ GdkEventButton *event)
++{
++ WebKitHitTestResult *hit_test;
++ WebKitHitTestResultContext context;
++ gchar *image_src;
++ gboolean visible;
++ GtkAction *action;
++ GList *extensions, *iter;
++ EWebView *web_view = E_WEB_VIEW (widget);
++
++ if (event->button != 3)
++ goto chainup;
++
++ hit_test = webkit_web_view_get_hit_test_result (
++ WEBKIT_WEB_VIEW (web_view), event);
++
++ g_object_get (
++ G_OBJECT (hit_test),
++ "context", &context,
++ "image-uri", &image_src,
++ NULL);
++
++ if ((context & WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE)) {
++ 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);
++
++ visible = (image_stream != NULL);
++
++ if (image_stream != NULL)
++ g_object_unref (image_stream);
++ }
++
++ if (image_src != NULL)
++ g_free (image_src);
++
++ action = e_web_view_get_action (web_view, "image-save");
++ if (action != NULL)
++ gtk_action_set_visible (action, visible);
++ }
++
++ extensions = e_extensible_list_extensions (
++ E_EXTENSIBLE (web_view), E_TYPE_EXTENSION);
++ for (iter = extensions; iter; iter = g_list_next (iter)) {
++ EExtension *extension = iter->data;
++
++ if (!E_IS_MAIL_DISPLAY_POPUP_EXTENSION (extension))
++ continue;
++
++ e_mail_display_popup_extension_update_actions (
++ E_MAIL_DISPLAY_POPUP_EXTENSION (extension), hit_test);
++ }
++ g_list_free (extensions);
++
++ g_object_unref (hit_test);
++
++chainup:
++ /* Chain up to parent's button_press_event() method. */
++ return GTK_WIDGET_CLASS (e_mail_display_parent_class)->
++ button_press_event (widget, event);
+ }
+
+ static void
+@@ -1407,9 +1427,11 @@ mail_display_set_fonts (EWebView *web_view,
+ {
+ EMailDisplay *display = E_MAIL_DISPLAY (web_view);
+ gboolean use_custom_font;
+- gchar *monospace_font, *variable_font;
++ gchar *monospace_font;
++ gchar *variable_font;
+
+- use_custom_font = g_settings_get_boolean (display->priv->settings, "use-custom-font");
++ use_custom_font = g_settings_get_boolean (
++ display->priv->settings, "use-custom-font");
+ if (!use_custom_font) {
+ *monospace = NULL;
+ *variable = NULL;
+@@ -1417,19 +1439,17 @@ mail_display_set_fonts (EWebView *web_view,
+ }
+
+ monospace_font = g_settings_get_string (
+- display->priv->settings,
+- "monospace-font");
++ display->priv->settings, "monospace-font");
+ variable_font = g_settings_get_string (
+- display->priv->settings,
+- "variable-width-font");
++ display->priv->settings, "variable-width-font");
+
+- *monospace = monospace_font ? pango_font_description_from_string (monospace_font) : NULL;
+- *variable = variable_font ? pango_font_description_from_string (variable_font) : NULL;
++ *monospace = (monospace_font != NULL) ?
++ pango_font_description_from_string (monospace_font) : NULL;
++ *variable = (variable_font != NULL) ?
++ pango_font_description_from_string (variable_font) : NULL;
+
+- if (monospace_font)
+- g_free (monospace_font);
+- if (variable_font)
+- g_free (variable_font);
++ g_free (monospace_font);
++ g_free (variable_font);
+ }
+
+ static void
+@@ -1447,14 +1467,14 @@ e_mail_display_class_init (EMailDisplayClass *class)
+ object_class->get_property = mail_display_get_property;
+ object_class->dispose = mail_display_dispose;
+
+- web_view_class = E_WEB_VIEW_CLASS (class);
+- web_view_class->set_fonts = mail_display_set_fonts;
+-
+ widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->realize = mail_display_realize;
+ widget_class->style_set = mail_display_style_set;
+ widget_class->button_press_event = mail_display_button_press_event;
+
++ web_view_class = E_WEB_VIEW_CLASS (class);
++ web_view_class->set_fonts = mail_display_set_fonts;
++
+ g_object_class_install_property (
+ object_class,
+ PROP_PART_LIST,
+@@ -1462,7 +1482,8 @@ e_mail_display_class_init (EMailDisplayClass *class)
+ "part-list",
+ "Part List",
+ NULL,
+- G_PARAM_READWRITE));
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (
+ object_class,
+@@ -1474,7 +1495,8 @@ e_mail_display_class_init (EMailDisplayClass *class)
+ E_MAIL_FORMATTER_MODE_INVALID,
+ G_MAXINT,
+ E_MAIL_FORMATTER_MODE_NORMAL,
+- G_PARAM_READWRITE));
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (
+ object_class,
+@@ -1484,7 +1506,8 @@ e_mail_display_class_init (EMailDisplayClass *class)
+ "Headers Collapsable",
+ NULL,
+ FALSE,
+- G_PARAM_READWRITE));
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (
+ object_class,
+@@ -1494,7 +1517,8 @@ e_mail_display_class_init (EMailDisplayClass *class)
+ "Headers Collapsed",
+ NULL,
+ FALSE,
+- G_PARAM_READWRITE));
++ G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS));
+ }
+
+ static void
+@@ -1562,35 +1586,44 @@ e_mail_display_init (EMailDisplay *display)
+
+ actions = e_web_view_get_action_group (E_WEB_VIEW (display), "mailto");
+ gtk_action_group_add_actions (
+- actions, mailto_entries, G_N_ELEMENTS (mailto_entries), display);
++ actions, mailto_entries,
++ G_N_ELEMENTS (mailto_entries), display);
+ ui_manager = e_web_view_get_ui_manager (E_WEB_VIEW (display));
+ gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL);
+
+ actions = e_web_view_get_action_group (E_WEB_VIEW (display), "image");
+ gtk_action_group_add_actions (
+- actions, image_entries, G_N_ELEMENTS (image_entries), display);
++ actions, image_entries,
++ G_N_ELEMENTS (image_entries), display);
+ gtk_ui_manager_add_ui_from_string (ui_manager, image_ui, -1, NULL);
+
+- e_web_view_install_request_handler (E_WEB_VIEW (display), E_TYPE_MAIL_REQUEST);
+- e_web_view_install_request_handler (E_WEB_VIEW (display), E_TYPE_HTTP_REQUEST);
+- e_web_view_install_request_handler (E_WEB_VIEW (display), E_TYPE_FILE_REQUEST);
+- e_web_view_install_request_handler (E_WEB_VIEW (display), E_TYPE_STOCK_REQUEST);
++ e_web_view_install_request_handler (
++ E_WEB_VIEW (display), E_TYPE_MAIL_REQUEST);
++ e_web_view_install_request_handler (
++ E_WEB_VIEW (display), E_TYPE_HTTP_REQUEST);
++ e_web_view_install_request_handler (
++ E_WEB_VIEW (display), E_TYPE_FILE_REQUEST);
++ e_web_view_install_request_handler (
++ E_WEB_VIEW (display), E_TYPE_STOCK_REQUEST);
+
+- if (!emd_global_http_cache) {
++ if (emd_global_http_cache == NULL) {
+ user_cache_dir = e_get_user_cache_dir ();
+ emd_global_http_cache = camel_data_cache_new (user_cache_dir, NULL);
+
+ /* cache expiry - 2 hour access, 1 day max */
+- camel_data_cache_set_expire_age (emd_global_http_cache, 24 * 60 * 60);
+- camel_data_cache_set_expire_access (emd_global_http_cache, 2 * 60 * 60);
++ camel_data_cache_set_expire_age (
++ emd_global_http_cache, 24 * 60 * 60);
++ camel_data_cache_set_expire_access (
++ emd_global_http_cache, 2 * 60 * 60);
+ }
+ }
+
+ EMailFormatterMode
+ e_mail_display_get_mode (EMailDisplay *display)
+ {
+- g_return_val_if_fail (E_IS_MAIL_DISPLAY (display),
+- E_MAIL_FORMATTER_MODE_NORMAL);
++ g_return_val_if_fail (
++ E_IS_MAIL_DISPLAY (display),
++ E_MAIL_FORMATTER_MODE_NORMAL);
+
+ return display->priv->mode;
+ }
+@@ -1600,6 +1633,7 @@ e_mail_display_set_mode (EMailDisplay *display,
+ EMailFormatterMode mode)
+ {
+ EMailFormatter *formatter;
++
+ g_return_if_fail (E_IS_MAIL_DISPLAY (display));
+
+ if (display->priv->mode == mode)
+@@ -1607,11 +1641,10 @@ e_mail_display_set_mode (EMailDisplay *display,
+
+ display->priv->mode = mode;
+
+- if (display->priv->mode == E_MAIL_FORMATTER_MODE_PRINTING) {
++ if (display->priv->mode == E_MAIL_FORMATTER_MODE_PRINTING)
+ formatter = e_mail_formatter_print_new ();
+- } else {
++ else
+ formatter = e_mail_formatter_new ();
+- }
+
+ g_clear_object (&display->priv->formatter);
+ display->priv->formatter = formatter;
+@@ -1619,7 +1652,8 @@ e_mail_display_set_mode (EMailDisplay *display,
+
+ g_signal_connect (
+ formatter, "notify::image-loading-policy",
+- G_CALLBACK (formatter_image_loading_policy_changed_cb), display);
++ G_CALLBACK (formatter_image_loading_policy_changed_cb),
++ display);
+
+ g_object_connect (
+ formatter,
+@@ -1675,12 +1709,12 @@ e_mail_display_set_parts_list (EMailDisplay *display,
+ if (display->priv->part_list == part_list)
+ return;
+
+- if (part_list) {
++ if (part_list != NULL) {
+ g_return_if_fail (E_IS_MAIL_PART_LIST (part_list));
+ g_object_ref (part_list);
+ }
+
+- if (display->priv->part_list)
++ if (display->priv->part_list != NULL)
+ g_object_unref (display->priv->part_list);
+
+ display->priv->part_list = part_list;
+@@ -1702,7 +1736,7 @@ e_mail_display_set_headers_collapsable (EMailDisplay *display,
+ {
+ g_return_if_fail (E_IS_MAIL_DISPLAY (display));
+
+- if ((display->priv->headers_collapsable ? 1 : 0) == (collapsable ? 1 : 0))
++ if (display->priv->headers_collapsable == collapsable)
+ return;
+
+ display->priv->headers_collapsable = collapsable;
+@@ -1728,7 +1762,7 @@ e_mail_display_set_headers_collapsed (EMailDisplay *display,
+ {
+ g_return_if_fail (E_IS_MAIL_DISPLAY (display));
+
+- if ((display->priv->headers_collapsed ? 1 : 0) == (collapsed ? 1 : 0))
++ if (display->priv->headers_collapsed == collapsed)
+ return;
+
+ display->priv->headers_collapsed = collapsed;
+@@ -1740,15 +1774,15 @@ void
+ e_mail_display_load (EMailDisplay *display,
+ const gchar *msg_uri)
+ {
+- gchar *uri;
+ EMailPartList *part_list;
++ gchar *uri;
+
+ g_return_if_fail (E_IS_MAIL_DISPLAY (display));
+
+ display->priv->force_image_load = FALSE;
+
+ part_list = display->priv->part_list;
+- if (!part_list) {
++ if (part_list == NULL) {
+ e_web_view_clear (E_WEB_VIEW (display));
+ return;
+ }
+@@ -1756,8 +1790,10 @@ e_mail_display_load (EMailDisplay *display,
+ uri = e_mail_part_build_uri (
+ part_list->folder, part_list->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,
++ "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);
+@@ -1779,7 +1815,7 @@ do_reload_display (EMailDisplay *display)
+
+ display->priv->scheduled_reload = 0;
+
+- if (!uri || !*uri)
++ if (uri == NULL || *uri == '\0')
+ return FALSE;
+
+ if (strstr (uri, "?") == NULL) {
+@@ -1794,9 +1830,12 @@ do_reload_display (EMailDisplay *display)
+ collapsed = g_strdup_printf ("%d", display->priv->headers_collapsed);
+
+ table = soup_form_decode (soup_uri->query);
+- g_hash_table_replace (table, g_strdup ("mode"), mode);
+- g_hash_table_replace (table, g_strdup ("headers_collapsable"), collapsable);
+- g_hash_table_replace (table, g_strdup ("headers_collapsed"), collapsed);
++ g_hash_table_replace (
++ table, g_strdup ("mode"), mode);
++ g_hash_table_replace (
++ table, g_strdup ("headers_collapsable"), collapsable);
++ g_hash_table_replace (
++ table, g_strdup ("headers_collapsed"), collapsed);
+
+ query = soup_form_encode_hash (table);
+
+@@ -1879,6 +1918,7 @@ e_mail_display_set_status (EMailDisplay *display,
+ status);
+
+ e_web_view_load_string (E_WEB_VIEW (display), str);
++
+ g_free (str);
+ }
+
+@@ -1899,13 +1939,12 @@ mail_display_get_frame_selection_text (WebKitDOMElement *iframe)
+ WebKitDOMRange *range;
+
+ range = webkit_dom_dom_selection_get_range_at (selection, 0, NULL);
+- if (range) {
++ if (range != NULL)
+ return webkit_dom_range_to_string (range, NULL);
+- }
+ }
+
+ frames = webkit_dom_document_get_elements_by_tag_name (
+- document, "IFRAME");
++ document, "IFRAME");
+ length = webkit_dom_node_list_get_length (frames);
+ for (ii = 0; ii < length; ii++) {
+ WebKitDOMNode *node;
+@@ -1914,11 +1953,10 @@ mail_display_get_frame_selection_text (WebKitDOMElement *iframe)
+ node = webkit_dom_node_list_item (frames, ii);
+
+ text = mail_display_get_frame_selection_text (
+- WEBKIT_DOM_ELEMENT (node));
++ WEBKIT_DOM_ELEMENT (node));
+
+- if (text) {
++ if (text != NULL)
+ return text;
+- }
+ }
+
+ return NULL;
+@@ -1947,11 +1985,10 @@ e_mail_display_get_selection_plain_text (EMailDisplay *display)
+ node = webkit_dom_node_list_item (frames, ii);
+
+ text = mail_display_get_frame_selection_text (
+- WEBKIT_DOM_ELEMENT (node));
++ WEBKIT_DOM_ELEMENT (node));
+
+- if (text) {
++ if (text != NULL)
+ return text;
+- }
+ }
+
+ return NULL;
+@@ -1981,8 +2018,8 @@ e_mail_display_set_charset (EMailDisplay *display,
+ {
+ g_return_if_fail (E_IS_MAIL_DISPLAY (display));
+
+- if (display->priv->formatter) {
++ if (display->priv->formatter != NULL)
+ e_mail_formatter_set_charset (
+ display->priv->formatter, charset);
+- }
+ }
++
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0202-EWebView-cleanups.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0202-EWebView-cleanups.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0202-EWebView-cleanups.patch (added)
+++ experimental/evolution/debian/patches/0202-EWebView-cleanups.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,497 @@
+From 6bbe980a855c6fafbad9e28694de80dbe5a125f8 Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes at redhat.com>
+Date: Sat, 13 Oct 2012 20:34:51 -0400
+Subject: [PATCH 202/213] EWebView cleanups.
+
+(cherry picked from commit 446cd75900b3636156a92f764cb2db5306b687ec)
+---
+ widgets/misc/e-web-view.c | 169 ++++++++++++++++++++++++---------------------
+ 1 file changed, 91 insertions(+), 78 deletions(-)
+
+diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
+index 3840b34..e1fb5c5 100644
+--- a/widgets/misc/e-web-view.c
++++ b/widgets/misc/e-web-view.c
+@@ -260,7 +260,7 @@ action_image_copy_cb (GtkAction *action,
+ g_return_if_fail (animation != NULL);
+
+ pixbuf = gdk_pixbuf_animation_get_static_image (animation);
+- if (!pixbuf)
++ if (pixbuf == NULL)
+ return;
+
+ gtk_clipboard_set_image (clipboard, pixbuf);
+@@ -357,9 +357,8 @@ replace_text (WebKitDOMNode *node,
+ const gchar *text,
+ WebKitDOMNode *replacement)
+ {
+- /* NodeType 3 = TEXT_NODE */
++ /* NodeType 3 = TEXT_NODE */
+ if (webkit_dom_node_get_node_type (node) == 3) {
+-
+ gint text_length = strlen (text);
+
+ while (node) {
+@@ -371,20 +370,20 @@ replace_text (WebKitDOMNode *node,
+
+ current_node = node;
+
+- /* Don't use the WEBKIT_DOM_CHARACTER_DATA macro for
+- * casting. WebKit lies about type of the object and
+- * GLib will throw runtime warning about node not being
+- * WebKitDOMCharacterData, but the function will return
+- * correct and valid data.
+- * IMO it's bug in the Gtk bindings and WebKit internally
+- * handles it by the nodeType so therefor it works
+- * event for "invalid" objects. But really, who knows..?
+- */
++ /* Don't use the WEBKIT_DOM_CHARACTER_DATA macro for
++ * casting. WebKit lies about type of the object and
++ * GLib will throw runtime warning about node not being
++ * WebKitDOMCharacterData, but the function will return
++ * correct and valid data.
++ * IMO it's bug in the Gtk bindings and WebKit internally
++ * handles it by the nodeType so therefor it works
++ * event for "invalid" objects. But really, who knows..?
++ */
+ node_data = webkit_dom_character_data_get_data (
+- (WebKitDOMCharacterData *) node);
++ (WebKitDOMCharacterData *) node);
+
+ offset = strstr (node_data, text);
+- if (!offset) {
++ if (offset == NULL) {
+ node = NULL;
+ continue;
+ }
+@@ -394,7 +393,7 @@ replace_text (WebKitDOMNode *node,
+ webkit_dom_node_clone_node (replacement, TRUE);
+
+ data_length = webkit_dom_character_data_get_length (
+- (WebKitDOMCharacterData *) node);
++ (WebKitDOMCharacterData *) node);
+ if (split_offset < data_length) {
+
+ WebKitDOMNode *parent_node;
+@@ -424,7 +423,6 @@ replace_text (WebKitDOMNode *node,
+ }
+
+ } else {
+-
+ WebKitDOMNode *child, *next_child;
+
+ /* Iframe? Let's traverse inside! */
+@@ -435,20 +433,19 @@ replace_text (WebKitDOMNode *node,
+ frame_document =
+ webkit_dom_html_iframe_element_get_content_document (
+ WEBKIT_DOM_HTML_IFRAME_ELEMENT (node));
+- replace_text (WEBKIT_DOM_NODE (frame_document),
+- text, replacement);
++ replace_text (
++ WEBKIT_DOM_NODE (frame_document),
++ text, replacement);
+
+ } else {
+-
+ child = webkit_dom_node_get_first_child (node);
+- while (child) {
++ while (child != NULL) {
+ next_child = webkit_dom_node_get_next_sibling (child);
+ replace_text (child, text, replacement);
+ child = next_child;
+ }
+ }
+ }
+-
+ }
+
+ static void
+@@ -874,41 +871,43 @@ web_view_button_press_event (GtkWidget *widget,
+
+ web_view = E_WEB_VIEW (widget);
+
+- if (event) {
++ if (event != NULL) {
+ WebKitHitTestResult *test;
+ WebKitHitTestResultContext context;
+
+- if (web_view->priv->cursor_image) {
++ if (web_view->priv->cursor_image != NULL) {
+ g_object_unref (web_view->priv->cursor_image);
+ web_view->priv->cursor_image = NULL;
+ }
+
+- if (web_view->priv->cursor_image_src) {
++ if (web_view->priv->cursor_image_src != NULL) {
+ g_free (web_view->priv->cursor_image_src);
+ web_view->priv->cursor_image_src = NULL;
+ }
+
+- test = webkit_web_view_get_hit_test_result (WEBKIT_WEB_VIEW (web_view), event);
+- if (!test)
++ test = webkit_web_view_get_hit_test_result (
++ WEBKIT_WEB_VIEW (web_view), event);
++ if (test == NULL)
+ goto chainup;
+
+ g_object_get (G_OBJECT (test), "context", &context, NULL);
++
+ if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE) {
+ WebKitWebDataSource *data_source;
+ WebKitWebFrame *frame;
+ GList *subresources, *res;
+
+- g_object_get (G_OBJECT (test), "image-uri", &uri, NULL);
++ g_object_get (
++ G_OBJECT (test), "image-uri", &uri, NULL);
+
+- if (!uri)
++ if (uri == NULL)
+ goto chainup;
+
+- if (web_view->priv->cursor_image_src)
+- g_free (web_view->priv->cursor_image_src);
++ g_free (web_view->priv->cursor_image_src);
+ web_view->priv->cursor_image_src = uri;
+
+- /* Iterate through all resources of the loaded webpage and
+- try to find resource with URI matching cursor_image_src */
++ /* Iterate through all resources of the loaded webpage and
++ * try to find resource with URI matching cursor_image_src */
+ frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
+ data_source = webkit_web_frame_get_data_source (frame);
+ subresources = webkit_web_data_source_get_subresources (data_source);
+@@ -922,7 +921,7 @@ web_view_button_press_event (GtkWidget *widget,
+ continue;
+
+ data = webkit_web_resource_get_data (src);
+- if (!data)
++ if (data == NULL)
+ break;
+
+ loader = gdk_pixbuf_loader_new ();
+@@ -933,7 +932,7 @@ web_view_button_press_event (GtkWidget *widget,
+ }
+ gdk_pixbuf_loader_close (loader, NULL);
+
+- if (web_view->priv->cursor_image)
++ if (web_view->priv->cursor_image != NULL)
+ g_object_unref (web_view->priv->cursor_image);
+
+ web_view->priv->cursor_image =
+@@ -975,7 +974,6 @@ web_view_scroll_event (GtkWidget *widget,
+ if (event->state & GDK_CONTROL_MASK) {
+ GdkScrollDirection direction = event->direction;
+
+- #if GTK_CHECK_VERSION(3,3,18)
+ if (direction == GDK_SCROLL_SMOOTH) {
+ static gdouble total_delta_y = 0.0;
+
+@@ -991,7 +989,6 @@ web_view_scroll_event (GtkWidget *widget,
+ return FALSE;
+ }
+ }
+- #endif
+
+ switch (direction) {
+ case GDK_SCROLL_UP:
+@@ -1137,7 +1134,8 @@ web_view_link_clicked (EWebView *web_view,
+ if (uri && g_ascii_strncasecmp (uri, "mailto:", 7) == 0) {
+ gboolean handled = FALSE;
+
+- g_signal_emit (web_view, signals[PROCESS_MAILTO], 0, uri, &handled);
++ g_signal_emit (
++ web_view, signals[PROCESS_MAILTO], 0, uri, &handled);
+
+ if (handled)
+ return;
+@@ -1168,8 +1166,7 @@ web_view_load_uri (EWebView *web_view,
+ if (uri == NULL)
+ uri = "about:blank";
+
+- webkit_web_view_load_uri (
+- WEBKIT_WEB_VIEW (web_view), uri);
++ webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view), uri);
+ }
+
+ static void
+@@ -1177,18 +1174,21 @@ web_view_frame_load_string (EWebView *web_view,
+ const gchar *frame_name,
+ const gchar *string)
+ {
+- WebKitWebFrame *main_frame, *frame;
++ WebKitWebFrame *main_frame;
+
+ if (string == NULL)
+ string = "";
+
+ main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
+- if (main_frame) {
++ if (main_frame != NULL) {
++ WebKitWebFrame *frame;
++
+ frame = webkit_web_frame_find_frame (main_frame, frame_name);
+
+- if (frame)
++ if (frame != NULL)
+ webkit_web_frame_load_string (
+- frame, string, "text/html", "UTF-8", "evo-file:///");
++ frame, string, "text/html",
++ "UTF-8", "evo-file:///");
+ }
+ }
+
+@@ -1197,16 +1197,18 @@ web_view_frame_load_uri (EWebView *web_view,
+ const gchar *frame_name,
+ const gchar *uri)
+ {
+- WebKitWebFrame *main_frame, *frame;
++ WebKitWebFrame *main_frame;
+
+ if (uri == NULL)
+ uri = "about:blank";
+
+ main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
+- if (main_frame) {
++ if (main_frame != NULL) {
++ WebKitWebFrame *frame;
++
+ frame = webkit_web_frame_find_frame (main_frame, frame_name);
+
+- if (frame)
++ if (frame != NULL)
+ webkit_web_frame_load_uri (frame, uri);
+ }
+ }
+@@ -1889,7 +1891,8 @@ e_web_view_clear (EWebView *web_view)
+ "<html><head></head><body bgcolor=\"#%06x\"></body></html>",
+ e_color_to_value (&style->base[GTK_STATE_NORMAL]));
+
+- webkit_web_view_load_html_string (WEBKIT_WEB_VIEW (web_view), html, NULL);
++ webkit_web_view_load_html_string (
++ WEBKIT_WEB_VIEW (web_view), html, NULL);
+
+ g_free (html);
+ }
+@@ -1974,16 +1977,18 @@ const gchar *
+ e_web_view_frame_get_uri (EWebView *web_view,
+ const gchar *frame_name)
+ {
+- WebKitWebFrame *main_frame, *frame;
++ WebKitWebFrame *main_frame;
+
+ g_return_val_if_fail (E_IS_WEB_VIEW (web_view), NULL);
+ g_return_val_if_fail (frame_name != NULL, NULL);
+
+ main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
+- if (main_frame) {
++ if (main_frame != NULL) {
++ WebKitWebFrame *frame;
++
+ frame = webkit_web_frame_find_frame (main_frame, frame_name);
+
+- if (frame)
++ if (frame != NULL)
+ return webkit_web_frame_get_uri (frame);
+ }
+
+@@ -2002,7 +2007,7 @@ e_web_view_get_html (EWebView *web_view)
+ element = webkit_dom_document_get_document_element (document);
+
+ return webkit_dom_html_element_get_outer_html (
+- WEBKIT_DOM_HTML_ELEMENT (element));
++ WEBKIT_DOM_HTML_ELEMENT (element));
+ }
+
+ gboolean
+@@ -2019,7 +2024,7 @@ e_web_view_set_caret_mode (EWebView *web_view,
+ {
+ g_return_if_fail (E_IS_WEB_VIEW (web_view));
+
+- if ((web_view->priv->caret_mode ? 1 : 0) == (caret_mode ? 1 : 0))
++ if (web_view->priv->caret_mode == caret_mode)
+ return;
+
+ web_view->priv->caret_mode = caret_mode;
+@@ -2050,7 +2055,7 @@ e_web_view_set_disable_printing (EWebView *web_view,
+ {
+ g_return_if_fail (E_IS_WEB_VIEW (web_view));
+
+- if ((web_view->priv->disable_printing ? 1 : 0) == (disable_printing ? 1 : 0))
++ if (web_view->priv->disable_printing == disable_printing)
+ return;
+
+ web_view->priv->disable_printing = disable_printing;
+@@ -2072,7 +2077,7 @@ e_web_view_set_disable_save_to_disk (EWebView *web_view,
+ {
+ g_return_if_fail (E_IS_WEB_VIEW (web_view));
+
+- if ((web_view->priv->disable_save_to_disk ? 1 : 0) == (disable_save_to_disk ? 1 : 0))
++ if (web_view->priv->disable_save_to_disk == disable_save_to_disk)
+ return;
+
+ web_view->priv->disable_save_to_disk = disable_save_to_disk;
+@@ -2086,13 +2091,15 @@ e_web_view_get_enable_frame_flattening (EWebView *web_view)
+ WebKitWebSettings *settings;
+ gboolean flattening;
+
+- /* Return TRUE with fail since it's default value we set in _init(). */
++ /* Return TRUE with fail since it's default value we set in _init(). */
+ g_return_val_if_fail (E_IS_WEB_VIEW (web_view), TRUE);
+
+ settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (web_view));
+ g_return_val_if_fail (settings != NULL, TRUE);
+
+- g_object_get (G_OBJECT (settings), "enable-frame-flattening", &flattening, NULL);
++ g_object_get (
++ G_OBJECT (settings),
++ "enable-frame-flattening", &flattening, NULL);
+
+ return flattening;
+ }
+@@ -2413,8 +2420,8 @@ e_web_view_add_highlight (EWebView *web_view,
+ g_return_if_fail (E_IS_WEB_VIEW (web_view));
+ g_return_if_fail (highlight && *highlight);
+
+- web_view->priv->highlights =
+- g_slist_append (web_view->priv->highlights, g_strdup (highlight));
++ web_view->priv->highlights = g_slist_append (
++ web_view->priv->highlights, g_strdup (highlight));
+
+ web_view_update_document_highlights (web_view);
+ }
+@@ -2653,7 +2660,7 @@ web_view_get_frame_selection_html (WebKitDOMElement *iframe)
+ gulong ii, length;
+
+ document = webkit_dom_html_iframe_element_get_content_document (
+- WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe));
++ WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe));
+ window = webkit_dom_document_get_default_view (document);
+ selection = webkit_dom_dom_window_get_selection (window);
+ if (selection && (webkit_dom_dom_selection_get_range_count (selection) > 0)) {
+@@ -2662,7 +2669,7 @@ web_view_get_frame_selection_html (WebKitDOMElement *iframe)
+ WebKitDOMDocumentFragment *fragment;
+
+ range = webkit_dom_dom_selection_get_range_at (selection, 0, NULL);
+- if (range) {
++ if (range != NULL) {
+ fragment = webkit_dom_range_clone_contents (
+ range, NULL);
+
+@@ -2678,7 +2685,7 @@ web_view_get_frame_selection_html (WebKitDOMElement *iframe)
+ }
+
+ frames = webkit_dom_document_get_elements_by_tag_name (
+- document, "IFRAME");
++ document, "IFRAME");
+ length = webkit_dom_node_list_get_length (frames);
+ for (ii = 0; ii < length; ii++) {
+ WebKitDOMNode *node;
+@@ -2687,11 +2694,10 @@ web_view_get_frame_selection_html (WebKitDOMElement *iframe)
+ node = webkit_dom_node_list_item (frames, ii);
+
+ text = web_view_get_frame_selection_html (
+- WEBKIT_DOM_ELEMENT (node));
++ WEBKIT_DOM_ELEMENT (node));
+
+- if (text) {
++ if (text != NULL)
+ return text;
+- }
+ }
+
+ return NULL;
+@@ -2720,11 +2726,10 @@ e_web_view_get_selection_html (EWebView *web_view)
+ node = webkit_dom_node_list_item (frames, ii);
+
+ text = web_view_get_frame_selection_html (
+- WEBKIT_DOM_ELEMENT (node));
++ WEBKIT_DOM_ELEMENT (node));
+
+- if (text) {
++ if (text != NULL)
+ return text;
+- }
+ }
+
+ return NULL;
+@@ -2739,8 +2744,11 @@ e_web_view_set_settings (EWebView *web_view,
+ if (settings == webkit_web_view_get_settings (WEBKIT_WEB_VIEW (web_view)))
+ return;
+
+- g_object_bind_property (settings, "enable-caret-browsing", web_view, "caret-mode",
+- G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
++ g_object_bind_property (
++ settings, "enable-caret-browsing",
++ web_view, "caret-mode",
++ G_BINDING_BIDIRECTIONAL |
++ G_BINDING_SYNC_CREATE);
+
+ webkit_web_view_set_settings (WEBKIT_WEB_VIEW (web_view), settings);
+ }
+@@ -2752,7 +2760,8 @@ e_web_view_get_default_settings (void)
+
+ settings = webkit_web_settings_new ();
+
+- g_object_set (G_OBJECT (settings),
++ g_object_set (
++ G_OBJECT (settings),
+ "enable-frame-flattening", TRUE,
+ "enable-java-applet", FALSE,
+ "enable-html5-database", FALSE,
+@@ -2768,6 +2777,7 @@ e_web_view_get_default_settings (void)
+ void
+ e_web_view_update_fonts (EWebView *web_view)
+ {
++ EWebViewClass *class;
+ GString *stylesheet;
+ gchar *base64;
+ gchar *aa = NULL;
+@@ -2779,21 +2789,24 @@ e_web_view_update_fonts (EWebView *web_view)
+ GdkColor *link = NULL;
+ GdkColor *visited = NULL;
+
++ g_return_if_fail (E_IS_WEB_VIEW (web_view));
++
+ ms = NULL;
+ vw = NULL;
+
+- if (E_WEB_VIEW_GET_CLASS (web_view)->set_fonts)
+- E_WEB_VIEW_GET_CLASS (web_view)->set_fonts (web_view, &ms, &vw);
++ class = E_WEB_VIEW_GET_CLASS (web_view);
++ if (class->set_fonts != NULL)
++ class->set_fonts (web_view, &ms, &vw);
+
+ if (ms == NULL) {
+ gchar *font;
+
+ font = g_settings_get_string (
+- web_view->priv->font_settings,
+- "monospace-font-name");
++ web_view->priv->font_settings,
++ "monospace-font-name");
+
+ ms = pango_font_description_from_string (
+- font ? font : "monospace 10");
++ (font != NULL) ? font : "monospace 10");
+
+ g_free (font);
+ }
+@@ -2802,11 +2815,11 @@ e_web_view_update_fonts (EWebView *web_view)
+ gchar *font;
+
+ font = g_settings_get_string (
+- web_view->priv->font_settings,
+- "font-name");
++ web_view->priv->font_settings,
++ "font-name");
+
+ vw = pango_font_description_from_string (
+- font ? font : "serif 10");
++ (font != NULL) ? font : "serif 10");
+
+ g_free (font);
+ }
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0203-Bug-685786-EWebView-Signal-handlers-never-disconnect.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0203-Bug-685786-EWebView-Signal-handlers-never-disconnect.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0203-Bug-685786-EWebView-Signal-handlers-never-disconnect.patch (added)
+++ experimental/evolution/debian/patches/0203-Bug-685786-EWebView-Signal-handlers-never-disconnect.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,68 @@
+From f7763bab384c94f7ad6ee46617346d9ae8eec7cb Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes at redhat.com>
+Date: Sat, 13 Oct 2012 20:37:32 -0400
+Subject: [PATCH 203/213] Bug 685786 - EWebView: Signal handlers never
+ disconnected
+
+Both EWebView and EMailDisplay listen for "changed" signals from a
+GSettings instance, passing itself as the 'user_data' to the signal
+handler e_web_view_update_fonts(). But in both cases the signal
+handler was left connected after EWebView and EMailDisplay were
+finalized, resulting in the signal handler receiving a dangling pointer.
+
+Not using g_signal_connect_object() here because of the unresolved
+reference leak issue in GObject. The GSettings instance is likely
+cached internally and lives well beyond EWebView and EMailDisplay.
+
+(cherry picked from commit 890f31bd076da194c5b7ea8022e72c8aad4a0de1)
+---
+ mail/e-mail-display.c | 9 ++++++++-
+ widgets/misc/e-web-view.c | 6 ++++++
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
+index 82934ea..5e33ccd 100644
+--- a/mail/e-mail-display.c
++++ b/mail/e-mail-display.c
+@@ -1313,8 +1313,15 @@ mail_display_dispose (GObject *object)
+ priv->widgets = NULL;
+ }
+
++ if (priv->settings != NULL) {
++ g_signal_handlers_disconnect_matched (
++ priv->settings, G_SIGNAL_MATCH_DATA,
++ 0, 0, NULL, NULL, object);
++ g_object_unref (priv->settings);
++ priv->settings = NULL;
++ }
++
+ g_clear_object (&priv->part_list);
+- g_clear_object (&priv->settings);
+ g_clear_object (&priv->formatter);
+
+ /* Chain up to parent's dispose() method. */
+diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
+index e1fb5c5..84c473d 100644
+--- a/widgets/misc/e-web-view.c
++++ b/widgets/misc/e-web-view.c
+@@ -803,11 +803,17 @@ web_view_dispose (GObject *object)
+ }
+
+ if (priv->aliasing_settings != NULL) {
++ g_signal_handlers_disconnect_matched (
++ priv->aliasing_settings, G_SIGNAL_MATCH_DATA,
++ 0, 0, NULL, NULL, object);
+ g_object_unref (priv->aliasing_settings);
+ priv->aliasing_settings = NULL;
+ }
+
+ if (priv->font_settings != NULL) {
++ g_signal_handlers_disconnect_matched (
++ priv->font_settings, G_SIGNAL_MATCH_DATA,
++ 0, 0, NULL, NULL, object);
+ g_object_unref (priv->font_settings);
+ priv->font_settings = NULL;
+ }
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0204-evolution.convert-Remove-leftover-force-message-limi.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0204-evolution.convert-Remove-leftover-force-message-limi.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0204-evolution.convert-Remove-leftover-force-message-limi.patch (added)
+++ experimental/evolution/debian/patches/0204-evolution.convert-Remove-leftover-force-message-limi.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,33 @@
+From 366a9d1df78d012b07b7417ca78c4427d3a2d97c Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes at redhat.com>
+Date: Mon, 15 Oct 2012 11:15:10 -0400
+Subject: [PATCH 204/213] evolution.convert: Remove leftover
+ "force-message-limit" entry.
+
+The GSettings key was removed in commit f4c30fe:
+"Bug #672249 - Crash when showing message with large text/plain"
+
+This was causing gsettings-data-convert to abort and not mark itself
+as having run, so the GConf conversion runs repeatedly, potentially
+overwriting changes the user made in GSettings.
+
+(cherry picked from commit b2f37bb1e10e6aff19843489fded9a136377a70a)
+---
+ data/evolution.convert | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/data/evolution.convert b/data/evolution.convert
+index 1246152..a859168 100644
+--- a/data/evolution.convert
++++ b/data/evolution.convert
+@@ -139,7 +139,6 @@ error-timeout = /apps/evolution/mail/display/error_timeout
+ filters-log-actions = /apps/evolution/mail/filters/log
+ filters-log-file = /apps/evolution/mail/filters/logfile
+ flush-outbox = /apps/evolution/mail/filters/flush-outbox
+-force-message-limit = /apps/evolution/mail/display/force_message_limit
+ forward-style = /apps/evolution/mail/format/forward_style
+ global-view-setting = /apps/evolution/mail/display/global_view_setting
+ headers = /apps/evolution/mail/display/headers
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0205-Bug-663844-CalDAV-calendar-home-set-href-may-contain.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0205-Bug-663844-CalDAV-calendar-home-set-href-may-contain.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0205-Bug-663844-CalDAV-calendar-home-set-href-may-contain.patch (added)
+++ experimental/evolution/debian/patches/0205-Bug-663844-CalDAV-calendar-home-set-href-may-contain.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,55 @@
+From d731853d3f78a3989c0bf1123065088a1ebe864b Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Mon, 15 Oct 2012 19:10:58 +0200
+Subject: [PATCH 205/213] Bug #663844 - [CalDAV] calendar-home-set/href may
+ contain full URI
+
+---
+ modules/cal-config-caldav/e-caldav-chooser.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/modules/cal-config-caldav/e-caldav-chooser.c b/modules/cal-config-caldav/e-caldav-chooser.c
+index fa5c9b7..b4c51a9 100644
+--- a/modules/cal-config-caldav/e-caldav-chooser.c
++++ b/modules/cal-config-caldav/e-caldav-chooser.c
+@@ -99,7 +99,7 @@ static void e_caldav_chooser_authenticator_init
+ static void caldav_chooser_get_collection_details
+ (SoupSession *session,
+ SoupMessage *message,
+- const gchar *path,
++ const gchar *path_or_uri,
+ GSimpleAsyncResult *simple);
+
+ G_DEFINE_DYNAMIC_TYPE_EXTENDED (
+@@ -884,13 +884,25 @@ exit:
+ static void
+ caldav_chooser_get_collection_details (SoupSession *session,
+ SoupMessage *message,
+- const gchar *path,
++ const gchar *path_or_uri,
+ GSimpleAsyncResult *simple)
+ {
+ SoupURI *soup_uri;
+
+- soup_uri = soup_uri_copy (soup_message_get_uri (message));
+- soup_uri_set_path (soup_uri, path);
++ soup_uri = soup_uri_new (path_or_uri);
++ if (!soup_uri ||
++ !soup_uri_get_scheme (soup_uri) ||
++ !soup_uri_get_host (soup_uri) ||
++ !soup_uri_get_path (soup_uri) ||
++ !*soup_uri_get_scheme (soup_uri) ||
++ !*soup_uri_get_host (soup_uri) ||
++ !*soup_uri_get_path (soup_uri)) {
++ /* it's a path only, not full uri */
++ if (soup_uri)
++ soup_uri_free (soup_uri);
++ soup_uri = soup_uri_copy (soup_message_get_uri (message));
++ soup_uri_set_path (soup_uri, path_or_uri);
++ }
+
+ message = caldav_chooser_new_propfind (
+ session, soup_uri, DEPTH_1,
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0206-Bug-686278-Prefer-plain-can-break-parts-list.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0206-Bug-686278-Prefer-plain-can-break-parts-list.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0206-Bug-686278-Prefer-plain-can-break-parts-list.patch (added)
+++ experimental/evolution/debian/patches/0206-Bug-686278-Prefer-plain-can-break-parts-list.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,69 @@
+From 031f8b29725a27ff8ba823b4e8f1efc3022b9e61 Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Wed, 17 Oct 2012 12:07:46 +0200
+Subject: [PATCH 206/213] Bug #686278 - Prefer-plain can break parts list
+
+---
+ modules/prefer-plain/e-mail-parser-prefer-plain.c | 23 +++++++--------------
+ 1 file changed, 7 insertions(+), 16 deletions(-)
+
+diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c
+index cd0b0bc..47d571b 100644
+--- a/modules/prefer-plain/e-mail-parser-prefer-plain.c
++++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c
+@@ -182,8 +182,7 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
+ GSList *parts;
+ CamelContentType *ct;
+ gboolean has_calendar = FALSE;
+- GSList *plain_text_parts, *iter;
+- GSList *plain_text_placeholder = NULL;
++ GSList *plain_text_parts = NULL;
+
+ emp_pp = (EMailParserPreferPlain *) extension;
+
+@@ -220,7 +219,6 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
+ }
+
+ nparts = camel_multipart_get_number (mp);
+- plain_text_parts = NULL;
+ for (i = 0; i < nparts; i++) {
+
+ CamelMimePart *sp;
+@@ -251,13 +249,10 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
+
+ if (camel_content_type_is (ct, "text", "plain")) {
+
+- plain_text_parts = e_mail_parser_parse_part (
+- parser, sp, part_id, cancellable);
++ sparts = e_mail_parser_parse_part (
++ parser, sp, part_id, cancellable);
+
+- /* Placeholder - we will replace it by the actual text/plain
+- * parts later */
+- plain_text_placeholder = g_slist_alloc ();
+- parts = g_slist_concat (parts, plain_text_placeholder);
++ plain_text_parts = g_slist_concat (plain_text_parts, sparts);
+ continue;
+ }
+
+@@ -325,14 +320,10 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
+ hide_parts (plain_text_parts);
+ }
+
+- /* Replace the plain_text_placeholder by the actual plain_text_parts */
+- for (iter = parts; iter; iter = iter->next) {
+- if (iter && iter->next == plain_text_placeholder) {
+- break;
+- }
++ if (plain_text_parts) {
++ /* plain_text parts should be always first */
++ parts = g_slist_concat (plain_text_parts, parts);
+ }
+- plain_text_parts = g_slist_concat (plain_text_parts, plain_text_placeholder);
+- parts = g_slist_concat (iter, plain_text_parts);
+
+ g_string_truncate (part_id, partidlen);
+
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0207-Do-not-crash-in-create_default_shell.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0207-Do-not-crash-in-create_default_shell.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0207-Do-not-crash-in-create_default_shell.patch (added)
+++ experimental/evolution/debian/patches/0207-Do-not-crash-in-create_default_shell.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,42 @@
+From aea55dd5cf51c6046dea6bcb662781cb69ef6012 Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Wed, 17 Oct 2012 14:12:05 +0200
+Subject: [PATCH 207/213] Do not crash in create_default_shell()
+
+---
+ shell/main.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/shell/main.c b/shell/main.c
+index 2dbb132..344720e 100644
+--- a/shell/main.c
++++ b/shell/main.c
+@@ -420,10 +420,13 @@ create_default_shell (void)
+ NULL);
+
+ /* Failure to register is fatal. */
+- if (error != NULL)
+- g_error ("%s", error->message);
++ if (error != NULL) {
++ g_warning ("Cannot start Evolution, other instance is probably running and is unresponsive. System error: %s",
++ error->message);
++ g_clear_error (&error);
++ }
+
+- if (force_online)
++ if (force_online && shell)
+ e_shell_lock_network_available (shell);
+
+ g_object_unref (settings);
+@@ -656,6 +659,8 @@ main (gint argc,
+ e_ensure_type (WEBKIT_TYPE_WEB_VIEW);
+
+ shell = create_default_shell ();
++ if (!shell)
++ return 1;
+
+ if (quit) {
+ e_shell_quit (shell, E_SHELL_QUIT_OPTION);
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0208-GN-bug-685262-Attachments-disappear-when-dragged-in-.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0208-GN-bug-685262-Attachments-disappear-when-dragged-in-.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0208-GN-bug-685262-Attachments-disappear-when-dragged-in-.patch (added)
+++ experimental/evolution/debian/patches/0208-GN-bug-685262-Attachments-disappear-when-dragged-in-.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,42 @@
+From 8c81665473fc4fbd66da70d6215a26848eb6446c Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Wed, 17 Oct 2012 15:42:44 +0200
+Subject: [PATCH 208/213] GN-bug #685262 - Attachments disappear when dragged
+ in message preview
+
+---
+ widgets/misc/e-web-view.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
+index 84c473d..2400683 100644
+--- a/widgets/misc/e-web-view.c
++++ b/widgets/misc/e-web-view.c
+@@ -1466,6 +1466,16 @@ web_view_selectable_select_all (ESelectable *selectable)
+ e_web_view_select_all (E_WEB_VIEW (selectable));
+ }
+
++static gboolean
++web_view_drag_motion (GtkWidget *widget,
++ GdkDragContext *context,
++ gint x,
++ gint y,
++ guint time_)
++{
++ return FALSE;
++}
++
+ static void
+ e_web_view_class_init (EWebViewClass *class)
+ {
+@@ -1487,6 +1497,7 @@ e_web_view_class_init (EWebViewClass *class)
+ widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->button_press_event = web_view_button_press_event;
+ widget_class->scroll_event = web_view_scroll_event;
++ widget_class->drag_motion = web_view_drag_motion;
+
+ #if 0 /* WEBKIT */
+ html_class = GTK_HTML_CLASS (class);
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0209-Bug-310978-USENET-always-requires-authentication.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0209-Bug-310978-USENET-always-requires-authentication.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0209-Bug-310978-USENET-always-requires-authentication.patch (added)
+++ experimental/evolution/debian/patches/0209-Bug-310978-USENET-always-requires-authentication.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,53 @@
+From 96777ceb3aad387bc3332ae960a0c2c140b9212f Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Thu, 18 Oct 2012 12:50:38 +0200
+Subject: [PATCH 209/213] Bug #310978 - USENET always requires authentication
+
+---
+ modules/mail-config/e-mail-config-remote-accounts.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/modules/mail-config/e-mail-config-remote-accounts.c b/modules/mail-config/e-mail-config-remote-accounts.c
+index 984438e..491db02 100644
+--- a/modules/mail-config/e-mail-config-remote-accounts.c
++++ b/modules/mail-config/e-mail-config-remote-accounts.c
+@@ -318,6 +318,7 @@ mail_config_remote_backend_check_complete (EMailConfigServiceBackend *backend)
+ EMailConfigRemoteBackend *remote_backend;
+ CamelSettings *settings;
+ CamelNetworkSettings *network_settings;
++ CamelProvider *provider;
+ EPortEntry *port_entry;
+ const gchar *host;
+ const gchar *user;
+@@ -325,19 +326,25 @@ mail_config_remote_backend_check_complete (EMailConfigServiceBackend *backend)
+ remote_backend = E_MAIL_CONFIG_REMOTE_BACKEND (backend);
+
+ settings = e_mail_config_service_backend_get_settings (backend);
++ provider = e_mail_config_service_backend_get_provider (backend);
++
++ g_return_val_if_fail (provider != NULL, FALSE);
+
+ network_settings = CAMEL_NETWORK_SETTINGS (settings);
+ host = camel_network_settings_get_host (network_settings);
+ user = camel_network_settings_get_user (network_settings);
+
+- if (host == NULL || *host == '\0')
++ if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_HOST) &&
++ (host == NULL || *host == '\0'))
+ return FALSE;
+
+ port_entry = E_PORT_ENTRY (remote_backend->port_entry);
+- if (!e_port_entry_is_valid (port_entry))
++ if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_PORT) &&
++ !e_port_entry_is_valid (port_entry))
+ return FALSE;
+
+- if (user == NULL || *user == '\0')
++ if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_USER) &&
++ (user == NULL || *user == '\0'))
+ return FALSE;
+
+ return TRUE;
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0210-Decode-EMailRequest-priv-uri_base-URI-escaped-letter.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0210-Decode-EMailRequest-priv-uri_base-URI-escaped-letter.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0210-Decode-EMailRequest-priv-uri_base-URI-escaped-letter.patch (added)
+++ experimental/evolution/debian/patches/0210-Decode-EMailRequest-priv-uri_base-URI-escaped-letter.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,32 @@
+From ebc86adc4f30f126eae7742df454a6b2a1aac47c Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Thu, 18 Oct 2012 14:31:15 +0200
+Subject: [PATCH 210/213] Decode EMailRequest::priv::uri_base URI-escaped
+ letters
+
+It's for cases when message UID contains letters which are supposed
+to be encoded, like "<>" in NNTP message UIDs. Without the decode
+the message preview is left empty and only console shows a runtime
+critical warning:
+ handle_mail_request: assertion `part_list != NULL' failed
+---
+ mail/e-mail-request.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
+index b0cbede..ca92f12 100644
+--- a/mail/e-mail-request.c
++++ b/mail/e-mail-request.c
+@@ -340,7 +340,8 @@ mail_request_send_async (SoupRequest *request,
+ emr->priv->full_uri = soup_uri_to_string (uri, FALSE);
+ uri_str = g_strdup_printf (
+ "%s://%s%s", uri->scheme, uri->host, uri->path);
+- emr->priv->uri_base = uri_str;
++ emr->priv->uri_base = soup_uri_decode (uri_str);
++ g_free (uri_str);
+
+ simple = g_simple_async_result_new (
+ G_OBJECT (request), callback,
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0211-MailFolderCache-Silently-ignore-cancellation-errors.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0211-MailFolderCache-Silently-ignore-cancellation-errors.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0211-MailFolderCache-Silently-ignore-cancellation-errors.patch (added)
+++ experimental/evolution/debian/patches/0211-MailFolderCache-Silently-ignore-cancellation-errors.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,31 @@
+From 285d428c069f512b828f12589d53bc3d2e00e60c Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes at redhat.com>
+Date: Thu, 18 Oct 2012 08:36:50 -0400
+Subject: [PATCH 211/213] MailFolderCache: Silently ignore cancellation
+ errors.
+
+(cherry picked from commit b0efa5cb274240e3d4c80c2d854dc8cbaa876b6b)
+---
+ libemail-engine/mail-folder-cache.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
+index 92aebbf..5561bb6 100644
+--- a/libemail-engine/mail-folder-cache.c
++++ b/libemail-engine/mail-folder-cache.c
+@@ -826,7 +826,11 @@ update_folders (CamelStore *store,
+
+ fi = camel_store_get_folder_info_finish (store, result, &error);
+
+- if (error != NULL) {
++ /* Silently ignore cancellation errors. */
++ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
++ g_error_free (error);
++
++ } else if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0212-Revert-Decode-EMailRequest-priv-uri_base-URI-escaped.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0212-Revert-Decode-EMailRequest-priv-uri_base-URI-escaped.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0212-Revert-Decode-EMailRequest-priv-uri_base-URI-escaped.patch (added)
+++ experimental/evolution/debian/patches/0212-Revert-Decode-EMailRequest-priv-uri_base-URI-escaped.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,30 @@
+From 90187051ee6beffc101ee840e282cd0e95302f2a Mon Sep 17 00:00:00 2001
+From: Matthew Barnes <mbarnes at redhat.com>
+Date: Thu, 18 Oct 2012 11:35:34 -0400
+Subject: [PATCH 212/213] Revert "Decode EMailRequest::priv::uri_base
+ URI-escaped letters"
+
+This reverts commit ebc86adc4f30f126eae7742df454a6b2a1aac47c.
+
+Incomplete solution, renders Bugzilla mails unreadable.
+---
+ mail/e-mail-request.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
+index ca92f12..b0cbede 100644
+--- a/mail/e-mail-request.c
++++ b/mail/e-mail-request.c
+@@ -340,8 +340,7 @@ mail_request_send_async (SoupRequest *request,
+ emr->priv->full_uri = soup_uri_to_string (uri, FALSE);
+ uri_str = g_strdup_printf (
+ "%s://%s%s", uri->scheme, uri->host, uri->path);
+- emr->priv->uri_base = soup_uri_decode (uri_str);
+- g_free (uri_str);
++ emr->priv->uri_base = uri_str;
+
+ simple = g_simple_async_result_new (
+ G_OBJECT (request), callback,
+--
+1.7.10.4
+
Added: experimental/evolution/debian/patches/0213-Encode-also-message_uid-in-e_mail_part_build_uri.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/0213-Encode-also-message_uid-in-e_mail_part_build_uri.patch?rev=2289&op=file
==============================================================================
--- experimental/evolution/debian/patches/0213-Encode-also-message_uid-in-e_mail_part_build_uri.patch (added)
+++ experimental/evolution/debian/patches/0213-Encode-also-message_uid-in-e_mail_part_build_uri.patch Thu Oct 18 20:41:10 2012
@@ -1,0 +1,50 @@
+From fb9b2232599f9cb3aa35c1d851f3926c54c469c5 Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Thu, 18 Oct 2012 18:03:49 +0200
+Subject: [PATCH 213/213] Encode also message_uid in e_mail_part_build_uri()
+
+This reverts commit ebc86adc4f30, which broke opening of IMAP message.
+It's also the correct solution for the initial issue, because
+the message_uid can contain letters which should be encoded in the URI.
+---
+ em-format/e-mail-part-utils.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/em-format/e-mail-part-utils.c b/em-format/e-mail-part-utils.c
+index 0d96d56..9c7c913 100644
+--- a/em-format/e-mail-part-utils.c
++++ b/em-format/e-mail-part-utils.c
+@@ -358,7 +358,7 @@ e_mail_part_animation_extract_frame (const GByteArray *anim,
+ /**
+ * e_mail_part_build_url:
+ * @folder: (allow-none) a #CamelFolder with the message or %NULL
+- * @message_uid: (allow-none) uid of the message within the @folder or %NULL
++ * @message_uid: uid of the message within the @folder
+ * @first_param_name: Name of first query parameter followed by GType of it's value and value
+ * terminated by %NULL.
+ *
+@@ -380,6 +380,7 @@ e_mail_part_build_uri (CamelFolder *folder,
+ va_list ap;
+ const gchar *name;
+ const gchar *service_uid, *folder_name;
++ gchar *encoded_message_uid;
+ gchar separator;
+
+ g_return_val_if_fail (message_uid && *message_uid, NULL);
+@@ -397,10 +398,12 @@ e_mail_part_build_uri (CamelFolder *folder,
+ service_uid = "generic";
+ }
+
++ encoded_message_uid = soup_uri_encode (message_uid, NULL);
+ tmp = g_strdup_printf ("mail://%s/%s/%s",
+ service_uid,
+ folder_name,
+- message_uid);
++ encoded_message_uid);
++ g_free (encoded_message_uid);
+
+ if (folder) {
+ g_free ((gchar *) folder_name);
+--
+1.7.10.4
+
Modified: experimental/evolution/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution/debian/patches/series?rev=2289&op=diff
==============================================================================
--- experimental/evolution/debian/patches/series (original)
+++ experimental/evolution/debian/patches/series Thu Oct 18 20:41:10 2012
@@ -1,2 +1,17 @@
02_nss_paths.patch
10_revert_libevolution_avoid-version.patch
+
+# patch >= 0200 are bugfixes from git
+0201-EMailDisplay-cleanups.patch
+0202-EWebView-cleanups.patch
+0203-Bug-685786-EWebView-Signal-handlers-never-disconnect.patch
+0204-evolution.convert-Remove-leftover-force-message-limi.patch
+0205-Bug-663844-CalDAV-calendar-home-set-href-may-contain.patch
+0206-Bug-686278-Prefer-plain-can-break-parts-list.patch
+0207-Do-not-crash-in-create_default_shell.patch
+0208-GN-bug-685262-Attachments-disappear-when-dragged-in-.patch
+0209-Bug-310978-USENET-always-requires-authentication.patch
+0210-Decode-EMailRequest-priv-uri_base-URI-escaped-letter.patch
+0211-MailFolderCache-Silently-ignore-cancellation-errors.patch
+0212-Revert-Decode-EMailRequest-priv-uri_base-URI-escaped.patch
+0213-Encode-also-message_uid-in-e_mail_part_build_uri.patch
More information about the pkg-evolution-commits
mailing list