summaryrefslogtreecommitdiff
path: root/gtk/gtkstyleproperty.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-12-31 03:54:17 +0100
committerBenjamin Otte <otte@redhat.com>2012-01-09 18:37:51 +0100
commit78dc75a350633c1c11dd555320ebb80575bcf586 (patch)
tree0135b727c5be2b410f970b8d4efd6e77d7b027a6 /gtk/gtkstyleproperty.c
parent3e24b5dbbec0161aa28dc32aac52d6c9e8f9a980 (diff)
downloadgtk+-78dc75a350633c1c11dd555320ebb80575bcf586.tar.gz
styleproperty: Make this an object
Diffstat (limited to 'gtk/gtkstyleproperty.c')
-rw-r--r--gtk/gtkstyleproperty.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index fb1ca2496c..0f70738ee8 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -55,6 +55,31 @@ static GHashTable *print_funcs = NULL;
static GHashTable *properties = NULL;
static GPtrArray *__style_property_array = NULL;
+G_DEFINE_TYPE (GtkStyleProperty, _gtk_style_property, G_TYPE_OBJECT)
+
+static void
+gtk_style_property_finalize (GObject *object)
+{
+ GtkStyleProperty *property = GTK_STYLE_PROPERTY (object);
+
+ g_warning ("finalizing %s `%s', how could this happen?", G_OBJECT_TYPE_NAME (object), property->pspec->name);
+
+ G_OBJECT_CLASS (_gtk_style_property_parent_class)->finalize (object);
+}
+
+static void
+_gtk_style_property_class_init (GtkStylePropertyClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = gtk_style_property_finalize;
+}
+
+static void
+_gtk_style_property_init (GtkStyleProperty *property)
+{
+}
+
static void
register_conversion_function (GType type,
GtkStyleParseFunc parse,
@@ -3228,7 +3253,7 @@ _gtk_style_property_register (GParamSpec *pspec,
return;
}
- node = g_slice_new0 (GtkStyleProperty);
+ node = g_object_new (GTK_TYPE_STYLE_PROPERTY, NULL);
node->flags = flags;
node->pspec = pspec;
node->property_parse_func = property_parse_func;