[gtk+] styleproperties: use property, not pspec as key



commit 914654901ca0b88d3f68bfa0d24e7802e4c49788
Author: Benjamin Otte <otte redhat com>
Date:   Sat May 28 04:36:48 2011 +0200

    styleproperties: use property, not pspec as key
    
    This allows calling functions on the style property from more places.

 gtk/gtkstyleproperties.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index 7e1cb29..2f15304 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -541,12 +541,12 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties     *props,
     }
 
   priv = props->priv;
-  prop = g_hash_table_lookup (priv->properties, style_prop->pspec);
+  prop = g_hash_table_lookup (priv->properties, style_prop);
 
   if (!prop)
     {
       prop = property_data_new ();
-      g_hash_table_insert (priv->properties, style_prop->pspec, prop);
+      g_hash_table_insert (priv->properties, (gpointer) style_prop, prop);
     }
 
   val = property_data_get_value (prop, state);
@@ -842,7 +842,7 @@ _gtk_style_properties_peek_property (GtkStyleProperties      *props,
     }
 
   priv = props->priv;
-  prop = g_hash_table_lookup (priv->properties, node->pspec);
+  prop = g_hash_table_lookup (priv->properties, node);
 
   if (!prop)
     return NULL;
@@ -1022,7 +1022,7 @@ gtk_style_properties_unset_property (GtkStyleProperties *props,
     }
 
   priv = props->priv;
-  prop = g_hash_table_lookup (priv->properties, node->pspec);
+  prop = g_hash_table_lookup (priv->properties, node);
 
   if (!prop)
     return;



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