[gtk+] css: Don't print both border-image-repeat values when they're identical



commit 90620603042bee8e32e3c8d88fac61615c6e7a7c
Author: Benjamin Otte <otte redhat com>
Date:   Thu Jul 21 02:40:34 2011 +0200

    css: Don't print both border-image-repeat values when they're identical

 gtk/gtkstyleproperty.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 89e7817..c44d0e7 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -1183,9 +1183,12 @@ border_image_repeat_value_print (const GValue *value,
 
   image_repeat = g_value_get_boxed (value);
 
-  g_string_append_printf (string, "%s %s",
-                          border_image_repeat_style_to_string (image_repeat->hrepeat),
-                          border_image_repeat_style_to_string (image_repeat->vrepeat));
+  g_string_append (string, border_image_repeat_style_to_string (image_repeat->hrepeat));
+  if (image_repeat->hrepeat != image_repeat->vrepeat)
+    {
+      g_string_append (string, " ");
+      g_string_append (string, border_image_repeat_style_to_string (image_repeat->vrepeat));
+    }
 }
 
 static gboolean



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