[gtk+/nth-child: 14/22] css: Rename function to _gtk_style_property_parse_value()



commit e7955187b652138b20e1b9a2c6eaf1d68bf3c195
Author: Benjamin Otte <otte redhat com>
Date:   Thu May 26 01:01:44 2011 +0200

    css: Rename function to _gtk_style_property_parse_value()
    
    ... and take an optional style property as argument. This way, we can
    allow custom parse functions for properties. The style property needs to
    be optional so that we can use it for widget style properties, too.

 gtk/gtkcssprovider.c          |   14 ++++++++------
 gtk/gtkstyleproperty.c        |    7 ++++---
 gtk/gtkstylepropertyprivate.h |    7 ++++---
 3 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 34d68af..303bb2d 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1370,9 +1370,10 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
                                         gtk_css_provider_parser_error,
                                         provider);
 
-          found = _gtk_css_value_parse (value,
-                                        parser,
-                                        NULL);
+          found = _gtk_style_property_parse_value (NULL,
+                                                   value,
+                                                   parser,
+                                                   NULL);
 
           _gtk_css_parser_free (parser);
 
@@ -2110,9 +2111,10 @@ parse_declaration (GtkCssScanner *scanner,
         }
       else
         {
-          if (_gtk_css_value_parse (val,
-                                    scanner->parser,
-                                    gtk_css_scanner_get_base_url (scanner)))
+          if (_gtk_style_property_parse_value (property,
+                                               val,
+                                               scanner->parser,
+                                               gtk_css_scanner_get_base_url (scanner)))
             {
               if (_gtk_css_parser_begins_with (scanner->parser, ';') ||
                   _gtk_css_parser_begins_with (scanner->parser, '}') ||
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index d3c35d9..097f85e 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -1374,9 +1374,10 @@ css_string_funcs_init (void)
 }
 
 gboolean
-_gtk_css_value_parse (GValue       *value,
-                      GtkCssParser *parser,
-                      GFile        *base)
+_gtk_style_property_parse_value (const GtkStyleProperty *property,
+                                 GValue                 *value,
+                                 GtkCssParser           *parser,
+                                 GFile                  *base)
 {
   ParseFunc func;
 
diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h
index ba9fd3f..2fa772b 100644
--- a/gtk/gtkstylepropertyprivate.h
+++ b/gtk/gtkstylepropertyprivate.h
@@ -56,9 +56,10 @@ void                     _gtk_style_property_pack          (const GtkStyleProper
                                                             GtkStateFlags           state,
                                                             GValue                 *value);
 
-gboolean                _gtk_css_value_parse              (GValue        *value,
-                                                           GtkCssParser  *parser,
-                                                           GFile         *base);
+gboolean                 _gtk_style_property_parse_value   (const GtkStyleProperty *property,
+                                                            GValue                 *value,
+                                                            GtkCssParser           *parser,
+                                                            GFile                  *base);
 void                     _gtk_style_property_print_value   (const GtkStyleProperty *property,
                                                             const GValue           *value,
                                                             GString                *string);



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