[gtk+/wip/css: 3/154] styleproperty: Assign a unique id to every styleproperty



commit c93d5655c0c92df18ea576b0503692fd3731f060
Author: Benjamin Otte <otte redhat com>
Date:   Fri Dec 23 12:31:16 2011 +0100

    styleproperty: Assign a unique id to every styleproperty

 gtk/gtkstyleproperty.c        |    2 ++
 gtk/gtkstylepropertyprivate.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index d300fef..f27cd73 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -52,6 +52,7 @@
 static GHashTable *parse_funcs = NULL;
 static GHashTable *print_funcs = NULL;
 static GHashTable *properties = NULL;
+static guint __n_style_properties = 0;
 
 static void
 register_conversion_function (GType             type,
@@ -3130,6 +3131,7 @@ _gtk_style_property_register (GParamSpec               *pspec,
 
   node = g_slice_new0 (GtkStyleProperty);
   node->flags = flags;
+  node->id = __n_style_properties++;
   node->pspec = pspec;
   node->property_parse_func = property_parse_func;
   node->pack_func = pack_func;
diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h
index 6aa6d59..5e33209 100644
--- a/gtk/gtkstylepropertyprivate.h
+++ b/gtk/gtkstylepropertyprivate.h
@@ -52,6 +52,7 @@ struct _GtkStyleProperty
 {
   GParamSpec               *pspec;
   GtkStylePropertyFlags     flags;
+  guint                     id;
 
   GtkStylePropertyParser    property_parse_func;
   GtkStyleUnpackFunc        unpack_func;



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