[gimp/wip/animation: 282/373] plug-ins: using g_printerr() instead of g_warning() for...



commit 6b676e526663394b70424ce617e7f4cddcebcb80
Author: Jehan <jehan girinstud io>
Date:   Wed Nov 16 16:22:08 2016 +0100

    plug-ins: using g_printerr() instead of g_warning() for...
    
    ... non-programmatical errors.
    For instance, when layers are removed, these are somehow "expected"
    errors in the plug-in runtime (since we have no hook to act when it
    actually happens). So I just log on stderr for user information.
    Let's use g_warning() only for potential programmatic errors (like
    failing to parse XML which we built ourselves).

 plug-ins/animation-play/core/animation-animatic.c  |    5 +++--
 .../animation-play/core/animation-celanimation.c   |    4 ++--
 plug-ins/animation-play/widgets/animation-xsheet.c |    6 +++---
 3 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/animation-play/core/animation-animatic.c 
b/plug-ins/animation-play/core/animation-animatic.c
index b650a38..c5a7a27 100644
--- a/plug-ins/animation-play/core/animation-animatic.c
+++ b/plug-ins/animation-play/core/animation-animatic.c
@@ -838,7 +838,6 @@ animation_animatic_cache (AnimationAnimatic *animatic,
   GeglBuffer               *backdrop_buffer = NULL;
   gint                      layer_offx;
   gint                      layer_offy;
-  /*gint                      position;*/
   gint                      preview_width;
   gint                      preview_height;
   gint32                    image_id;
@@ -850,7 +849,9 @@ animation_animatic_cache (AnimationAnimatic *animatic,
                                           priv->tattoos[panel]);
   if (! layer)
     {
-      g_warning ("Caching failed: a layer must have been deleted.");
+      g_printerr ("Warning: caching of panel %d failed; "
+                  "the associated layer must have been deleted.\n",
+                  panel);
       return;
     }
 
diff --git a/plug-ins/animation-play/core/animation-celanimation.c 
b/plug-ins/animation-play/core/animation-celanimation.c
index 7bd4c54..c2c29f0 100644
--- a/plug-ins/animation-play/core/animation-celanimation.c
+++ b/plug-ins/animation-play/core/animation-celanimation.c
@@ -1226,8 +1226,8 @@ animation_cel_animation_cache (AnimationCelAnimation *animation,
         source = gimp_drawable_get_buffer (layer);
       if (layer <= 0 || ! source)
         {
-          g_warning ("A layer used for frame %d has been removed. Ignoring.",
-                     pos);
+          g_printerr ("Warning: a layer used for frame %d has been deleted.\n",
+                      pos);
           continue;
         }
       gimp_drawable_offsets (layer, &layer_offx, &layer_offy);
diff --git a/plug-ins/animation-play/widgets/animation-xsheet.c 
b/plug-ins/animation-play/widgets/animation-xsheet.c
index ad88a42..3f7098a 100755
--- a/plug-ins/animation-play/widgets/animation-xsheet.c
+++ b/plug-ins/animation-play/widgets/animation-xsheet.c
@@ -1539,9 +1539,9 @@ animation_xsheet_rename_cel (AnimationXSheet *xsheet,
                                               GPOINTER_TO_INT (layers->data));
       if (layer <= 0)
         {
-          g_warning ("Removing invalid layer from cell: level %d, frame %d.",
-                     GPOINTER_TO_INT (track_num),
-                     GPOINTER_TO_INT (position));
+          g_printerr ("Warning: removing invalid layer from cell: level %d, frame %d.\n",
+                      GPOINTER_TO_INT (track_num),
+                      GPOINTER_TO_INT (position));
           /* Update the layer list on this cell. */
           animation_cel_animation_set_layers (xsheet->priv->animation,
                                               GPOINTER_TO_INT (track_num),


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