]> Pileus Git - ~andy/gtk/commitdiff
styleproperties: use property, not pspec as key
authorBenjamin Otte <otte@redhat.com>
Sat, 28 May 2011 02:36:48 +0000 (04:36 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Jun 2011 00:03:52 +0000 (02:03 +0200)
This allows calling functions on the style property from more places.

gtk/gtkstyleproperties.c

index 7e1cb29241cc73c1180587675aca4d35b3cc03c9..2f153044f409126003d1fdafc742749b46f6d2f5 100644 (file)
@@ -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;