Grr make it work if GTK < 2.22

svn path=/trunk/; revision=39112
This commit is contained in:
Anders Broman 2011-09-23 17:33:04 +00:00
parent 2dfabbf7f1
commit c936cbebe8
1 changed files with 9 additions and 0 deletions

View File

@ -1384,7 +1384,11 @@ static gboolean draw_area_draw(GtkWidget *widget, cairo_t *cr, gpointer data)
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
#if GTK_CHECK_VERSION(2,22,0)
cairo_set_source_surface (cr, user_data->dlg.surface_main, 0, 0);
#else
gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_main,0, 0);
#endif
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_fill (cr);
@ -1433,6 +1437,11 @@ static gboolean draw_comments(GtkWidget *widget, cairo_t *cr, gpointer data)
gtk_widget_get_allocation (widget, &allocation);
#if GTK_CHECK_VERSION(2,22,0)
cairo_set_source_surface (cr, user_data->dlg.surface_comments, 0, 0);
#else
gdk_cairo_set_source_pixmap (cr, user_data->dlg.pixmap_comments,0, 0);
#endif
cairo_set_source_surface (cr, user_data->dlg.surface_comments, 0, 0);
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_fill (cr);