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



commit ca5675056d6d316c9e52c1dfa884d7e8d0da4661
Author: Hans Breuer <hans breuer org>
Date:   Sun Oct 24 12:54:12 2010 +0200

    Noise reduction after g_warning for cairo_status(cr) != CAIRO_STATUS_SUCCESS
    
    Accidentially the whole logging of cairo rendering was enabled.

 plug-ins/cairo/diacairo.h |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/cairo/diacairo.h b/plug-ins/cairo/diacairo.h
index 1046e43..65265a6 100644
--- a/plug-ins/cairo/diacairo.h
+++ b/plug-ins/cairo/diacairo.h
@@ -25,16 +25,18 @@
 /*
 #define DEBUG_CAIRO
  */
-#if 1 /* def DEBUG_CAIRO */
+#ifdef DEBUG_CAIRO
 #  define DIAG_NOTE(action) action
-#  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)
 #endif
+/* Unconditional complain about cairo being in wrong state,
+ * it usually shows some wrong assumptions in Dia's code.
+ */
+#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))); \
+}
 
 /* --- the renderer base class --- */
 G_BEGIN_DECLS



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