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



commit 06ba2810d431aa9e5bf4e3331ad2c7fb0a4c03c9
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)
    
    Conflicts:
        plug-ins/common/file-cel.c

 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 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;
         }
 



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