[gtk+/wip/cssvalue: 129/142] cssprovider: Add an empty line when printing



commit 7ce1a7fab67743956f7f4330918eaf6637bc79e8
Author: Benjamin Otte <otte redhat com>
Date:   Thu Apr 5 22:28:21 2012 +0200

    cssprovider: Add an empty line when printing
    
    ... between the @define-color statements and the rules.

 gtk/gtkcssprovider.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index a34c5ed..0136414 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2934,7 +2934,7 @@ gtk_css_provider_to_string (GtkCssProvider *provider)
 
   for (i = 0; i < priv->rulesets->len; i++)
     {
-      if (i > 0)
+      if (str->len != 0)
         g_string_append (str, "\n");
       gtk_css_ruleset_print (&g_array_index (priv->rulesets, GtkCssRuleset, i), str);
     }



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