[dia] g_warning for (cairo_status (cr) != CAIRO_STATUS_SUCCESS)



commit e93b42030ae271418124e6d00429f946f7721b71
Author: Hans Breuer <hans breuer org>
Date:   Wed Oct 20 21:10:43 2010 +0200

    g_warning for (cairo_status (cr) != CAIRO_STATUS_SUCCESS)
    
    Bug 632175 would have complained, which would have been more appropriate
    than silently just not drawing some part of the diagram.

 plug-ins/cairo/diacairo.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/cairo/diacairo.h b/plug-ins/cairo/diacairo.h
index 3183b86..1046e43 100644
--- a/plug-ins/cairo/diacairo.h
+++ b/plug-ins/cairo/diacairo.h
@@ -25,9 +25,12 @@
 /*
 #define DEBUG_CAIRO
  */
-#ifdef DEBUG_CAIRO
+#if 1 /* def DEBUG_CAIRO */
 #  define DIAG_NOTE(action) action
-#  define DIAG_STATE(cr) { if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) g_print ("%s:%d, %s\n", __FILE__, __LINE__, cairo_status_to_string (cairo_status(cr))); }
+#  define DIAG_STATE(cr) { \
+  if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) \
+    g_warning ("%s:%d, %s\n", __FILE__, __LINE__, cairo_status_to_string (cairo_status(cr))); \
+}
 #else
 #  define DIAG_NOTE(action)
 #  define DIAG_STATE(cr)



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