[cairo-commit] goocanvas/demo demo.c,1.6,1.7
Damon Chaplin
commit at pdx.freedesktop.org
Thu Jun 1 02:59:25 PDT 2006
Committed by: damon
Update of /cvs/cairo/goocanvas/demo
In directory kemper:/tmp/cvs-serv16244/demo
Modified Files:
demo.c
Log Message:
2006-06-01 Damon Chaplin <damon at gnome.org>
* demo/demo.c: only add the "Output PDF" option if cairo has PDF
support compiled in.
Index: demo.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/demo.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- demo.c 24 Apr 2006 15:32:28 -0000 1.6
+++ demo.c 1 Jun 2006 09:59:24 -0000 1.7
@@ -10,7 +10,10 @@
#include <stdlib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <cairo.h>
+#if CAIRO_HAS_PDF_SURFACE
#include <cairo-pdf.h>
+#endif
#include <goocanvas.h>
GooCanvasItem *ellipse2, *textitem;
@@ -27,7 +30,7 @@
GtkWidget *create_paths_page (void);
GtkWidget *create_focus_page (void);
-
+#if CAIRO_HAS_PDF_SURFACE
static void
write_pdf_clicked (GtkWidget *button, GooCanvasView *canvas_view)
{
@@ -49,7 +52,7 @@
cairo_surface_destroy (surface);
cairo_destroy (cr);
}
-
+#endif
static void
zoom_changed (GtkAdjustment *adj, GooCanvasView *canvas_view)
@@ -405,6 +408,7 @@
canvas_view);
+#if CAIRO_HAS_PDF_SURFACE
/* Create PDF */
w = gtk_button_new_with_label("Write PDF");
@@ -413,7 +417,7 @@
g_signal_connect (w, "clicked",
(GtkSignalFunc) write_pdf_clicked,
canvas_view);
-
+#endif
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
More information about the cairo-commit
mailing list