From 165e1833b19f0426a5f0820de0198e57864c0cd1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 14 Sep 2001 22:15:54 +0000 Subject: [PATCH] io-pnm.c (pnm_read_header): Use GDK_PIXBUF_ERROR_CORRUPT_IMAGE, not GDK_PIXBUF_ERROR_HEADER_CORRUPT. (#58308) --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/io-pnm.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 08eca748eb..14d1ad947c 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 14 23:22:12 2001 Matthias Clasen + + * io-pnm.c (pnm_read_header): Use GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + not GDK_PIXBUF_ERROR_HEADER_CORRUPT. (#58308) + Fri Sep 14 22:53:45 2001 Matthias Clasen * io-jpeg.c (gdk_pixbuf__jpeg_image_begin_load): Handle diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c index eafe130933..455bd2f783 100644 --- a/gdk-pixbuf/io-pnm.c +++ b/gdk-pixbuf/io-pnm.c @@ -282,7 +282,7 @@ pnm_read_header (PnmLoaderContext *context) if (*inbuf->byte != 'P') { g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("PNM file has an incorrect initial byte")); return PNM_FATAL_ERR; } @@ -312,7 +312,7 @@ pnm_read_header (PnmLoaderContext *context) default: g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("PNM file is not in a recognized PNM subformat")); return PNM_FATAL_ERR; } @@ -337,7 +337,7 @@ pnm_read_header (PnmLoaderContext *context) if (!width) { g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("PNM file has an image width of 0")); return PNM_FATAL_ERR; } @@ -358,7 +358,7 @@ pnm_read_header (PnmLoaderContext *context) if (!height) { g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("PNM file has an image height of 0")); return PNM_FATAL_ERR; } @@ -381,7 +381,7 @@ pnm_read_header (PnmLoaderContext *context) if (context->maxval == 0) { g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Maximum color value in PNM file is 0")); return PNM_FATAL_ERR; } @@ -389,7 +389,7 @@ pnm_read_header (PnmLoaderContext *context) if (context->maxval > 65535) { g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Maximum color value in PNM file is too large")); return PNM_FATAL_ERR; } @@ -397,7 +397,7 @@ pnm_read_header (PnmLoaderContext *context) if (context->maxval > 255) { g_set_error (context->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_HEADER_CORRUPT, + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Can't handle PNM files with maximum color values greater than 255")); return PNM_FATAL_ERR; }