[gnumeric] Only use gtk_widget_get_snapshot when it is available :-)



commit f97ec81a25a92407b64ad0ad60cca81d74de821e
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Tue Dec 29 02:27:25 2009 -0700

    Only use gtk_widget_get_snapshot when it is available :-)
    
    2009-12-29  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/sheet-object-widget.c (sheet_widget_draw_cairo): only use
    	  this for gtk 2.14 and later (since we need  gtk_widget_get_snapshot

 ChangeLog                 |    5 +++++
 src/sheet-object-widget.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2c1ef21..59d7cf4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-29  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/sheet-object-widget.c (sheet_widget_draw_cairo): only use 
+	  this for gtk 2.14 and later (since we need  gtk_widget_get_snapshot
+
 2009-12-28  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* component/Gnumeric-embed.xml.in: add CopyDown and CopyRight
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 972c41b..ccb9a44 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -3269,6 +3269,9 @@ static void
 sheet_widget_draw_cairo (SheetObject const *so, cairo_t *cr,
 			 double width, double height)
 {
+#ifdef HAVE_GTK_DIALOG_GET_CONTENT_AREA
+/* so we have gtk 2.14 or later and gtk_widget_get_snapshot is available */
+
 	SheetObjectWidget *sow = SHEET_OBJECT_WIDGET (so);
 
 	if ((sow->so.realized_list->data != NULL)) {
@@ -3298,6 +3301,8 @@ sheet_widget_draw_cairo (SheetObject const *so, cairo_t *cr,
 		cairo_restore (cr);
 		g_object_unref(G_OBJECT (ss));
 	}
+
+#endif
 }
 
 



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