[gtk+] styleproperties: Use peek_property() in get_valist()



commit b67ae42ecd4a8bbd0f1e36b75569ed5b0454ad7d
Author: Benjamin Otte <otte redhat com>
Date:   Sat May 21 20:03:28 2011 +0200

    styleproperties: Use peek_property() in get_valist()

 gtk/gtkstyleproperties.c |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index 99bb341..afe7df5 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -908,26 +908,12 @@ gtk_style_properties_get_valist (GtkStyleProperties *props,
   while (property_name)
     {
       const GtkStyleProperty *node;
-      PropertyData *prop;
       gchar *error = NULL;
-      GValue *val = NULL;
-
-      node = _gtk_style_property_lookup (property_name);
+      const GValue *val;
 
+      val = _gtk_style_properties_peek_property (props, property_name, state, &node);
       if (!node)
-        {
-          g_warning ("Style property \"%s\" is not registered", property_name);
-          break;
-        }
-
-      prop = g_hash_table_lookup (priv->properties, node->pspec);
-
-      if (prop)
-        val = property_data_match_state (prop, state);
-
-      if (val &&
-          !style_properties_resolve_type (props, node, val))
-        val = NULL;
+        break;
 
       if (val)
         {



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