[gtk+/wip/cssvalue: 84/142] cssprovider: Store widget style value as string



commit ac8d566d9fafa50a2109189252825e47517dfd2b
Author: Benjamin Otte <otte redhat com>
Date:   Fri Mar 30 02:45:01 2012 +0200

    cssprovider: Store widget style value as string
    
    There's no need to turn it into a GtkCssValue, it's always a string.

 gtk/gtkcssprovider.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index e91b08e..a34c5ed 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -975,9 +975,9 @@ struct _PropertyValue {
 };
 
 struct _WidgetPropertyValue {
-  char *name;
   WidgetPropertyValue *next;
-  GtkCssValue         *value;
+  char *name;
+  char *value;
 
   GtkCssSection *section;
 };
@@ -1196,7 +1196,7 @@ widget_property_value_new (char *name, GtkCssSection *section)
 static void
 widget_property_value_free (WidgetPropertyValue *value)
 {
-  _gtk_css_value_unref (value->value);
+  g_free (value->value);
   g_free (value->name);
   if (value->section)
     gtk_css_section_unref (value->section);
@@ -1551,7 +1551,7 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
 					     NULL,
 					     val->section,
 					     val->section != NULL ? gtk_css_section_get_file (val->section) : NULL,
-					     _gtk_css_value_get_string (val->value));
+					     val->value);
 
 	      found = _gtk_css_style_parse_value (value,
 						  scanner->parser,
@@ -2264,7 +2264,7 @@ parse_declaration (GtkCssScanner *scanner,
           WidgetPropertyValue *val;
 
           val = widget_property_value_new (name, scanner->section);
-	  val->value = _gtk_css_value_new_take_string (value_str);
+	  val->value = value_str;
 
           gtk_css_ruleset_add_style (ruleset, name, val);
         }
@@ -2863,7 +2863,7 @@ gtk_css_ruleset_print (const GtkCssRuleset *ruleset,
           g_string_append (str, "  ");
           g_string_append (str, widget_value->name);
           g_string_append (str, ": ");
-          g_string_append (str, _gtk_css_value_get_string (widget_value->value));
+          g_string_append (str, widget_value->value);
           g_string_append (str, ";\n");
         }
 



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