[libgxps] Use GXPS_DEBUG instead of g_warning/g_debug directly



commit 144cdbb201cd860480e70fd8c94ac3d8dc58a123
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Tue Nov 1 13:05:58 2011 +0100

    Use GXPS_DEBUG instead of g_warning/g_debug directly

 libgxps/gxps-file.c   |    5 +++--
 libgxps/gxps-images.c |    9 +++++----
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/libgxps/gxps-file.c b/libgxps/gxps-file.c
index f6cdb46..17de4aa 100644
--- a/libgxps/gxps-file.c
+++ b/libgxps/gxps-file.c
@@ -25,6 +25,7 @@
 #include "gxps-archive.h"
 #include "gxps-private.h"
 #include "gxps-error.h"
+#include "gxps-debug.h"
 
 /**
  * SECTION:gxps-file
@@ -114,8 +115,8 @@ rels_start_element (GMarkupParseContext  *context,
 		} else if (strcmp (type, REL_METATADA_CORE_PROPS) == 0) {
 			xps->priv->core_props = g_strdup (target);
 		} else {
-			g_debug ("Unsupported attribute of %s, %s=%s\n",
-                                 element_name, type, target);
+			GXPS_DEBUG (g_debug ("Unsupported attribute of %s, %s=%s",
+                                             element_name, type, target));
 		}
 	} else if (strcmp (element_name, "Relationships") == 0) {
 		/* Nothing to do */
diff --git a/libgxps/gxps-images.c b/libgxps/gxps-images.c
index de6e826..28e26b2 100644
--- a/libgxps/gxps-images.c
+++ b/libgxps/gxps-images.c
@@ -34,6 +34,7 @@
 
 #include "gxps-images.h"
 #include "gxps-error.h"
+#include "gxps-debug.h"
 
 /* PNG */
 static cairo_status_t
@@ -263,8 +264,8 @@ gxps_images_create_from_jpeg (GXPSArchive *zip,
 					p[3] = 0xff;
 					break;
 				default:
-					g_warning ("Unsupported jpeg color space %s\n",
-						   _jpeg_color_space_name (cinfo.out_color_space));
+					GXPS_DEBUG (g_message ("Unsupported jpeg color space %s",
+                                                               _jpeg_color_space_name (cinfo.out_color_space)));
 
 					cairo_surface_destroy (surface);
 					jpeg_destroy_decompress (&cinfo);
@@ -618,7 +619,7 @@ gxps_images_get_image (GXPSArchive *zip,
 	} else if (g_str_has_suffix (image_uri, ".tif")) {
 		surface = gxps_images_create_from_tiff (zip, image_uri, error);
 	} else if (g_str_has_suffix (image_uri, "wdp")) {
-		g_warning ("Unsupported image format windows media photo\n");
+		GXPS_DEBUG (g_message ("Unsupported image format windows media photo"));
 		return NULL;
 	}
 
@@ -633,7 +634,7 @@ gxps_images_get_image (GXPSArchive *zip,
 		} else if (g_strcmp0 (mime_type, "image/tiff") == 0) {
 			surface = gxps_images_create_from_tiff (zip, image_uri, error);
 		} else {
-			g_warning ("Unsupported image format: %s\n", mime_type);
+			GXPS_DEBUG (g_message ("Unsupported image format: %s", mime_type));
 		}
 		g_free (mime_type);
 	}



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