[gtk+/wip/cssvalue: 85/141] cssprovider: Store widget style value as string



commit ac1e98ebd0c1cb6b41b61d03529ab45fc2aeb30f
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 2a45b38..361564c 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;
 };
@@ -1189,7 +1189,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);
   gtk_css_section_unref (value->section);
 
@@ -1539,7 +1539,7 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
 					     NULL,
 					     val->section,
 					     gtk_css_section_get_file (val->section),
-					     _gtk_css_value_get_string (val->value));
+					     val->value);
 
 	      found = _gtk_css_style_parse_value (value,
 						  scanner->parser,
@@ -2252,7 +2252,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);
         }
@@ -2851,7 +2851,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]