File bnc#775433-04-file-cel-use-g_set_error-for-errors-instead-of-g_mes.patch of Package gimp.817

From 476f7870182ae6b27027cae7166ce780f2444e61 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Fri, 13 Jul 2012 15:33:27 +0200
Subject: [PATCH 4/5] file-cel: use g_set_error() for errors instead of
 g_message() (cherry picked from commit
 a3b486d952664a6f9b98f7fb8f59042df79f59ef)

Conflicts:
    plug-ins/common/file-cel.c
---
 plug-ins/common/file-cel.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index 8e82ff7..39d2d7b 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -426,7 +426,7 @@ load_image (const gchar  *file,
 
   if (image == -1)
     {
-      g_message (_("Can't create a new image"));
+      g_set_error (error, 0, 0, _("Can't create a new image"));
       return -1;
     }
 
@@ -539,7 +539,8 @@ load_image (const gchar  *file,
           break;
 
         default:
-          g_message (_("Unsupported bit depth (%d)!"), bpp);
+          g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+                       _("Unsupported bit depth (%d)!"), bpp);
           return -1;
         }
 
-- 
1.7.10.4
openSUSE Build Service is sponsored by