[gimp/gimp-2-8] app, plug-ins: clean up previous commit by using g_error_set()...



commit f344f6a81ea30a96079492fc66204b9e309c2381
Author: Jehan <jehan girinstud io>
Date:   Thu Dec 21 21:55:04 2017 +0100

    app, plug-ins: clean up previous commit by using g_error_set()...
    
    ... instead of g_message().
    
    (cherry picked from commit 5b9e277625b3dd25cd9f26eea6471286fb71a165)

 app/core/gimpbrush-load.c  |    3 ++-
 plug-ins/common/file-gbr.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpbrush-load.c b/app/core/gimpbrush-load.c
index 682be89..bc67872 100644
--- a/app/core/gimpbrush-load.c
+++ b/app/core/gimpbrush-load.c
@@ -262,7 +262,8 @@ gimp_brush_load_brush (GimpContext  *context,
 
   if (header.header_size < sizeof (BrushHeader))
     {
-      g_message (_("Unsupported brush format"));
+      g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
+                   _("Unsupported brush format"));
       return NULL;
     }
 
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index a70f291..bedd2be 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -415,7 +415,8 @@ load_image (const gchar  *filename,
       bh.header_size += 8;
       if (bh.header_size < sizeof (BrushHeader))
         {
-          g_message (_("Unsupported brush format"));
+          g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+                       _("Unsupported brush format"));
           g_object_unref (input);
           return -1;
         }


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