[Libreoffice-commits] core.git: Branch 'feature/gtkbmptiledviewer2' - 2 commits - desktop/Executable_gtktiledviewer.mk desktop/Module_desktop.mk desktop/qa libreofficekit/Executable_gtktiledviewer.mk libreofficekit/Module_libreofficekit.mk libreofficekit/qa libreofficekit/source

Andrzej Hunt andrzej.hunt at collabora.com
Fri Jun 13 03:22:17 PDT 2014


 desktop/Executable_gtktiledviewer.mk                |   49 --------------
 desktop/Module_desktop.mk                           |    8 --
 desktop/qa/gtktiledviewer/gtktiledviewer.cxx        |   69 --------------------
 libreofficekit/Executable_gtktiledviewer.mk         |   49 ++++++++++++++
 libreofficekit/Module_libreofficekit.mk             |   10 ++
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |   69 ++++++++++++++++++++
 libreofficekit/source/gtk/lokdocview.c              |    7 ++
 7 files changed, 134 insertions(+), 127 deletions(-)

New commits:
commit 08e3a5f7f9eacccafda20757375d9a2e85e8e2af
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..4227f92 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -47,6 +47,13 @@ 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 );
commit 364a96b8e316aace902adc04a59a3b57afdec181
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Fri Jun 13 11:20:15 2014 +0100

    Move gtktiledviewer into libreofficekit.
    
    desktop is no longer the right place for it now that
    libreofficekit has its own directory.
    
    Change-Id: I207f1d642e7e35c460ff85bb57aa142cb98023c8

diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 04b71f7..cfaf0d9 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -29,14 +29,6 @@ $(eval $(call gb_Module_add_l10n_targets,desktop,\
     UIConfig_deployment \
 ))
 
-ifeq ($(OS),LINUX)
-ifneq ($(ENABLE_GTK),)
-$(eval $(call gb_Module_add_targets,desktop,\
-    Executable_gtktiledviewer \
-))
-endif
-endif
-
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
 $(eval $(call gb_Module_add_targets,desktop,\
     Executable_soffice_bin \
diff --git a/desktop/Executable_gtktiledviewer.mk b/libreofficekit/Executable_gtktiledviewer.mk
similarity index 95%
rename from desktop/Executable_gtktiledviewer.mk
rename to libreofficekit/Executable_gtktiledviewer.mk
index a0bf8ea..0ce9222 100644
--- a/desktop/Executable_gtktiledviewer.mk
+++ b/libreofficekit/Executable_gtktiledviewer.mk
@@ -43,7 +43,7 @@ $(eval $(call gb_Executable_add_libs,gtktiledviewer,\
 endif
 
 $(eval $(call gb_Executable_add_exception_objects,gtktiledviewer,\
-    desktop/qa/gtktiledviewer/gtktiledviewer \
+    libreofficekit/qa/gtktiledviewer/gtktiledviewer \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/libreofficekit/Module_libreofficekit.mk b/libreofficekit/Module_libreofficekit.mk
index d19c74a..2ad1b8d 100644
--- a/libreofficekit/Module_libreofficekit.mk
+++ b/libreofficekit/Module_libreofficekit.mk
@@ -10,10 +10,18 @@
 $(eval $(call gb_Module_Module,libreofficekit))
 
 ifeq ($(OS),LINUX)
+
 $(eval $(call gb_Module_add_targets,libreofficekit,\
     Library_libreofficekit \
     Library_libreofficekitgtk \
 ))
-endif
+
+ifneq ($(ENABLE_GTK),)
+$(eval $(call gb_Module_add_targets,libreofficekit,\
+    Executable_gtktiledviewer \
+))
+endif # ($(ENABLE_GTK),)
+
+endif # ($(OS),LINUX)
 
 # vim: set ts=4 sw=4 et:
diff --git a/desktop/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
similarity index 100%
rename from desktop/qa/gtktiledviewer/gtktiledviewer.cxx
rename to libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx


More information about the Libreoffice-commits mailing list