[Libreoffice-commits] core.git: Branch 'feature/gtkbmptiledviewer2' - libreofficekit/source
Andrzej Hunt
andrzej.hunt at collabora.com
Fri Jun 13 03:22:55 PDT 2014
Rebased ref, commits from common ancestor:
commit 3d3bd92c20cab2ea1907eb746d334a95fd0b1846
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Fri Jun 13 11:21:38 2014 +0100
Prevent GTK assertions due to scrolled window not being initialised.
Seems to be a gtk bug which we need to work around. The assertions
don't actually seem to cause any harm (they just print a bunch of
"Gtk-CRITICAL **: IA__gtk_range_get_adjustment: assertion `GTK_IS_RANGE (range)' failed"
but probably best to avoid them.
Change-Id: I5d1bb20bd5c0569c6d023a6148123208a15b9de2
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index 47967fc..2c56c81 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -47,6 +47,12 @@ static void lok_docview_class_init( LOKDocViewClass* pClass )
static void lok_docview_init( LOKDocView* pDocView )
{
+ // Gtk ScrolledWindow is apparently not fully initialised yet, we specifically
+ // have to set the [hv]adjustment to prevent GTK assertions from firing, see
+ // https://bugzilla.gnome.org/show_bug.cgi?id=438114 for more info.
+ gtk_scrolled_window_set_hadjustment( GTK_SCROLLED_WINDOW( pDocView ), NULL );
+ gtk_scrolled_window_set_vadjustment( GTK_SCROLLED_WINDOW( pDocView ), NULL );
+
pDocView->pEventBox = gtk_event_box_new();
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(pDocView),
pDocView->pEventBox );
More information about the Libreoffice-commits
mailing list