aboutsummaryrefslogtreecommitdiff
path: root/src/libcustomindicator
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-22 16:04:52 -0500
committerTed Gould <ted@canonical.com>2009-10-22 16:04:52 -0500
commit20caa2fd37e681b8a6682a0ab3535767902256e6 (patch)
tree6337ca78842181a31ce16a8d21c1ff5e1a24c886 /src/libcustomindicator
parent603044567814b8a5bc895bb22a1bf3ea35e788a2 (diff)
downloadlibayatana-appindicator-20caa2fd37e681b8a6682a0ab3535767902256e6.tar.gz
libayatana-appindicator-20caa2fd37e681b8a6682a0ab3535767902256e6.tar.bz2
libayatana-appindicator-20caa2fd37e681b8a6682a0ab3535767902256e6.zip
We can't get the enum values from the string param spec, we need to find the enum one and then use that.
Diffstat (limited to 'src/libcustomindicator')
-rw-r--r--src/libcustomindicator/custom-indicator.c6
1 files changed, 4 insertions, 2 deletions
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);