From c54c552e63a59efd72223f3114a323e69c723d5c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 31 Aug 2013 13:09:26 -0400 Subject: EMailDisplay: Remove mail_display_plugin_widget_realize_cb(). Apparently not required anymore, and was actually causing embedded widgets for attachments to malfunction when collapsed and expanded again -- particularly audio attachments. --- mail/e-mail-display.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index ac90ae2d71..9343ac01ba 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -389,35 +389,6 @@ mail_display_plugin_widget_resize (GtkWidget *widget, g_free (dim); } -static void -mail_display_plugin_widget_realize_cb (GtkWidget *widget, - gpointer user_data) -{ - WebKitDOMHTMLElement *element; - - if (GTK_IS_BOX (widget)) { - GList *children; - - children = gtk_container_get_children (GTK_CONTAINER (widget)); - if (children != NULL && E_IS_ATTACHMENT_BAR (children->data)) - widget = children->data; - g_list_free (children); - } - - /* First check if we are actually supposed to be visible */ - element = g_object_get_data (G_OBJECT (widget), "parent_element"); - if (element == NULL || !WEBKIT_DOM_IS_HTML_ELEMENT (element)) { - g_warn_if_reached (); - } else if (webkit_dom_html_element_get_hidden (element)) { - gtk_widget_hide (widget); - return; - } - - /* Initial resize of the element when the widget - * is displayed for the first time. */ - mail_display_plugin_widget_resize (widget, NULL, user_data); -} - static void plugin_widget_set_parent_element (GtkWidget *widget, EMailDisplay *display) @@ -621,9 +592,6 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view, /* Resizing a GtkWidget requires changing size of parent * HTML element in DOM. */ - g_signal_connect ( - widget, "realize", - G_CALLBACK (mail_display_plugin_widget_realize_cb), display); g_signal_connect ( widget, "size-allocate", G_CALLBACK (mail_display_plugin_widget_resize), display); -- cgit v1.2.3