[gtk+] css: Fix printing of images



commit 3fd9bda06f5393cf87836bdd4f544a9e23f99594
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Apr 26 00:01:59 2016 -0400

    css: Fix printing of images
    
    When there is only a call in a fallback image, we were errnoneously
    printing out a comma before it.

 gtk/gtkcssimagefallback.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssimagefallback.c b/gtk/gtkcssimagefallback.c
index b7c3a9d..620dd94 100644
--- a/gtk/gtkcssimagefallback.c
+++ b/gtk/gtkcssimagefallback.c
@@ -99,7 +99,8 @@ gtk_css_image_fallback_print (GtkCssImage *image,
     }
   if (fallback->color)
     {
-      g_string_append (string, ",");
+      if (fallback->n_images > 0)
+        g_string_append (string, ",");
       _gtk_css_value_print (fallback->color, string);
     }
 


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