[Libreoffice-commits] .: vcl/unx

Michael Meeks michael at kemper.freedesktop.org
Tue Jun 14 09:16:44 PDT 2011


 vcl/unx/gtk/app/gtkinst.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 3d17667828888f46cc43c5b5e91f33a9b31da472
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Tue Jun 14 17:15:31 2011 +0100

    don't bomb out with gtk3 if we are expecting it

diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 745f6a0..be2430b 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -133,6 +133,11 @@ extern "C"
 
     VCLPLUG_GTK_PUBLIC SalInstance* create_SalInstance( oslModule pModule )
     {
+#if OSL_DEBUG_LEVEL > 0
+        fprintf( stderr, "create vcl plugin instance with gtk version %d %d %d\n",
+                 (int) gtk_major_version, (int) gtk_minor_version,
+                 (int) gtk_micro_version );
+#endif
         /* #i92121# workaround deadlocks in the X11 implementation
         */
         static const char* pNoXInitThreads = getenv( "SAL_NO_XINITTHREADS" );
@@ -143,7 +148,11 @@ extern "C"
         if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
             XInitThreads();
 
+#if GTK_CHECK_VERSION(3,0,0)
+        const gchar* pVersion = gtk_check_version( 3, 0, 0 );
+#else
         const gchar* pVersion = gtk_check_version( 2, 2, 0 );
+#endif
         if( pVersion )
         {
 #if OSL_DEBUG_LEVEL > 1


More information about the Libreoffice-commits mailing list