From 20caa2fd37e681b8a6682a0ab3535767902256e6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 22 Oct 2009 16:04:52 -0500 Subject: We can't get the enum values from the string param spec, we need to find the enum one and then use that. --- src/libcustomindicator/custom-indicator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libcustomindicator') diff --git a/src/libcustomindicator/custom-indicator.c b/src/libcustomindicator/custom-indicator.c index d7148f6..fc8b3da 100644 --- a/src/libcustomindicator/custom-indicator.c +++ b/src/libcustomindicator/custom-indicator.c @@ -491,7 +491,8 @@ custom_indicator_get_property (GObject * object, guint prop_id, GValue * value, /* *********************** */ case PROP_CATEGORY: if (G_VALUE_HOLDS_STRING(value)) { - GParamSpecEnum * enumspec = G_PARAM_SPEC_ENUM(pspec); + GParamSpec * spec_for_enum = g_object_class_find_property(G_OBJECT_GET_CLASS(object), PROP_CATEGORY_ENUM_S); + GParamSpecEnum * enumspec = G_PARAM_SPEC_ENUM(spec_for_enum); if (enumspec != NULL) { GEnumValue * enumval = g_enum_get_value(enumspec->enum_class, priv->category); g_value_set_string(value, enumval->value_nick); @@ -514,7 +515,8 @@ custom_indicator_get_property (GObject * object, guint prop_id, GValue * value, /* *********************** */ case PROP_STATUS: if (G_VALUE_HOLDS_STRING(value)) { - GParamSpecEnum * enumspec = G_PARAM_SPEC_ENUM(pspec); + GParamSpec * spec_for_enum = g_object_class_find_property(G_OBJECT_GET_CLASS(object), PROP_STATUS_ENUM_S); + GParamSpecEnum * enumspec = G_PARAM_SPEC_ENUM(spec_for_enum); if (enumspec != NULL) { GEnumValue * enumval = g_enum_get_value(enumspec->enum_class, priv->status); g_value_set_string(value, enumval->value_nick); -- cgit v1.2.3