goffice r2303 - in trunk: . goffice goffice/cut-n-paste/foocanvas



Author: mortenw
Date: Tue Jan  6 19:41:05 2009
New Revision: 2303
URL: http://svn.gnome.org/viewvc/goffice?rev=2303&view=rev

Log:
Make things compile with quarts gtk.

2009-01-06  Morten Welinder  <terra gnome org>

	* goffice/goffice.c (libgoffice_init): Call g_type_init early as
	go_conf_init might need it.



Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/goffice/cut-n-paste/foocanvas/foo-canvas-rect-ellipse.c
   trunk/goffice/goffice.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Jan  6 19:41:05 2009
@@ -424,7 +424,7 @@
   AC_CHECK_FUNCS(gtk_dialog_get_response_for_widget)
   AC_CHECK_FUNCS(gtk_widget_set_tooltip_text gtk_tool_item_set_tooltip_text,
 		 [test $gtk_disable_deprecated = no || gtk_disable_deprecated=yes])
-  AC_CHECK_FUNCS(gdk_cairo_set_source_pixbuf)
+  AC_CHECK_FUNCS(gdk_cairo_set_source_pixbuf gdk_x11_drawable_get_xdisplay)
 fi
 CFLAGS=$SAVE_CFLAGS
 LIBS=$SAVE_LIBS

Modified: trunk/goffice/cut-n-paste/foocanvas/foo-canvas-rect-ellipse.c
==============================================================================
--- trunk/goffice/cut-n-paste/foocanvas/foo-canvas-rect-ellipse.c	(original)
+++ trunk/goffice/cut-n-paste/foocanvas/foo-canvas-rect-ellipse.c	Tue Jan  6 19:41:05 2009
@@ -42,7 +42,9 @@
 #include <string.h>
 
 #ifdef HAVE_RENDER
+#ifdef HAVE_GDK_X11_DRAWABLE_GET_XDISPLAY
 #include <gdk/gdkx.h>
+#endif
 #include <X11/extensions/Xrender.h>
 #endif
 
@@ -844,6 +846,7 @@
 
 	priv = FOO_CANVAS_RECT (item)->priv;
 
+#ifdef HAVE_GDK_X11_DRAWABLE_GET_XDISPLAY
 	dpy = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (item->canvas)->window);
 	priv->use_render = XRenderQueryExtension (dpy, &event_base, &error_base);
 
@@ -856,6 +859,10 @@
 
 		priv->format = XRenderFindVisualFormat (dpy, visual);
 	}
+#else
+	priv->use_render = FALSE;
+	priv->format = NULL;
+#endif
 #endif
 
 	if (FOO_CANVAS_ITEM_CLASS (rect_parent_class)->realize) {
@@ -888,7 +895,7 @@
 	b = (rgba >> 8) & 0xff;
 	a = (rgba >> 0) & 0xff;
 
-#ifdef HAVE_RENDER
+#if defined(HAVE_RENDER) && defined(HAVE_GDK_X11_DRAWABLE_GET_XDISPLAY)
 	/* Every visual is not guaranteed to have a matching
 	 * XRenderPictFormat. So make sure that format is not null before
 	 * trying to render using Xrender calls.

Modified: trunk/goffice/goffice.c
==============================================================================
--- trunk/goffice/goffice.c	(original)
+++ trunk/goffice/goffice.c	Tue Jan  6 19:41:05 2009
@@ -120,6 +120,7 @@
 
 	bindtextdomain (GETTEXT_PACKAGE, libgoffice_locale_dir);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	g_type_init ();
 	go_conf_init ();
 	go_fonts_init ();
 	go_math_init ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]