From 446f41757b425441976e5a2b32c233f64036e6ff Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 19 Jun 2008 12:47:48 +0000 Subject: Use g_set_error_literal where appropriate. Bug #538640. svn path=/trunk/; revision=20463 --- gdk-pixbuf/io-gdip-utils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gdk-pixbuf/io-gdip-utils.c') diff --git a/gdk-pixbuf/io-gdip-utils.c b/gdk-pixbuf/io-gdip-utils.c index 392c3bfc6a..74a0f17584 100644 --- a/gdk-pixbuf/io-gdip-utils.c +++ b/gdk-pixbuf/io-gdip-utils.c @@ -107,7 +107,7 @@ gdip_set_error_from_gpstatus (GError **error, gint code, GpStatus status) default: msg = "Unknown error"; } - g_set_error (error, GDK_PIXBUF_ERROR, code, msg); + g_set_error_literal (error, GDK_PIXBUF_ERROR, code, msg); } static gboolean @@ -733,7 +733,7 @@ stop_load (GpBitmap *bitmap, GdipContext *context, GError **error) g_object_unref (G_OBJECT (animation)); destroy_gdipcontext (context); - g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, _("Couldn't create pixbuf")); + g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, _("Couldn't create pixbuf")); return FALSE; } @@ -795,7 +795,7 @@ gdk_pixbuf__gdip_image_stop_load (gpointer data, GError **error) if (!bitmap) { destroy_gdipcontext (context); - g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Couldn't load bitmap")); + g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Couldn't load bitmap")); return FALSE; } @@ -818,7 +818,7 @@ gdk_pixbuf__gdip_image_stop_vector_load (gpointer data, GError **error) metafile = gdip_buffer_to_image ((gchar *)image_buffer->data, image_buffer->len, error); if (!metafile) { destroy_gdipcontext (context); - g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Couldn't load metafile")); + g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Couldn't load metafile")); return FALSE; } @@ -977,14 +977,14 @@ gdip_save_pixbuf (GdkPixbuf *pixbuf, gboolean success; if (!GetEncoderClsid (format, &clsid)) { - g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED, _("Unsupported image format for GDI+")); + g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED, _("Unsupported image format for GDI+")); return FALSE; } image = gdip_pixbuf_to_bitmap (pixbuf); if (image == NULL) { - g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED, _("Couldn't save")); + g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED, _("Couldn't save")); return FALSE; } -- cgit v1.2.1