[evolution/wip/webkit2] Correct packing of the EHTMLEditorView in the EMsgComposer
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Correct packing of the EHTMLEditorView in the EMsgComposer
- Date: Tue, 8 Mar 2016 13:07:22 +0000 (UTC)
commit 16a85b66b4cb956959719447d1cf6d27ebac987b
Author: Milan Crha <mcrha redhat com>
Date: Tue Mar 8 14:04:03 2016 +0100
Correct packing of the EHTMLEditorView in the EMsgComposer
The WebKitWebView is not a scrollable anymore, thus the GtkScrollableWindow
packs it into a GtkViewport. That means the direct parent of the view is
the viewport, not the scrollable window. Count with this in the code and
show a runtime warning if any of these assumptions fail in the future.
composer/e-composer-private.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 6ab5fa0..73f20a1 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -261,6 +261,9 @@ e_composer_private_constructed (EMsgComposer *composer)
widget = GTK_WIDGET (view);
widget = gtk_widget_get_parent (widget);
+ if (GTK_IS_VIEWPORT (widget))
+ widget = gtk_widget_get_parent (widget);
+ g_warn_if_fail (GTK_IS_SCROLLED_WINDOW (widget));
gtk_widget_reparent (widget, container);
/* Construct the picture gallery. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]