[gtk+] css: Rename function to _gtk_style_property_parse_value()



commit 5a42464547a06a080f532044a35683f82fe67f2e
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 1b3c12e..5d35797 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1371,9 +1371,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);
 
@@ -2122,9 +2123,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 9771eb5..7a0003d 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -1375,9 +1375,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]