[gimp/gimp-2-8] file-cel: use g_set_error() for errors instead of g_message() (cherry picked from commit 86f4cd39bd4



commit a21aceedf1de04afc8fc06109786e9a1431504b9
Author: Nils Philippsen <nils redhat com>
Date:   Fri Jul 13 15:33:27 2012 +0200

    file-cel: use g_set_error() for errors instead of g_message()
    (cherry picked from commit 86f4cd39bd493c88a7a19b56d1827d8b911e07f6)

 plug-ins/common/file-cel.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index 0f2a4c7..6292d7a 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"));
       fclose (fp);
       return -1;
     }
@@ -540,7 +540,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;
         }
 



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