aboutsummaryrefslogtreecommitdiff
path: root/src/libappindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-06 11:55:50 -0800
committerTed Gould <ted@gould.cx>2010-02-06 11:55:50 -0800
commit035f56558cccf52c5c2052bb1f80a4b7519ed4c5 (patch)
treea65f642047ded386fd45a4180d0a0e72066b44a4 /src/libappindicator
parentf8ab455538c130ce03132e2557c9363e9a808156 (diff)
downloadayatana-indicator-application-035f56558cccf52c5c2052bb1f80a4b7519ed4c5.tar.gz
ayatana-indicator-application-035f56558cccf52c5c2052bb1f80a4b7519ed4c5.tar.bz2
ayatana-indicator-application-035f56558cccf52c5c2052bb1f80a4b7519ed4c5.zip
Changing the type of the property and setting it with boxed
Diffstat (limited to 'src/libappindicator')
-rw-r--r--src/libappindicator/app-indicator.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 908684f..2befb34 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -215,10 +215,10 @@ app_indicator_class_init (AppIndicatorClass *klass)
g_object_class_install_property(object_class,
PROP_MENU,
- g_param_spec_string (PROP_MENU_S,
+ g_param_spec_boxed (PROP_MENU_S,
"The object path of the menu on DBus.",
"A method for getting the menu path as a string for DBus.",
- NULL,
+ DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
@@ -541,14 +541,14 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa
break;
case PROP_MENU:
- if (G_VALUE_HOLDS_STRING(value)) {
- if (priv->menuservice != NULL) {
- g_object_get_property (G_OBJECT (priv->menuservice), DBUSMENU_SERVER_PROP_DBUS_OBJECT, value);
- }
- } else {
- WARN_BAD_TYPE(PROP_MENU_S, value);
- }
- break;
+ if (priv->menuservice != NULL) {
+ GValue strval = {0};
+ g_value_init(&strval, G_TYPE_STRING);
+ g_object_get_property (G_OBJECT (priv->menuservice), DBUSMENU_SERVER_PROP_DBUS_OBJECT, &strvalue);
+ g_value_set_boxed(value, g_value_get_string(&strvalue));
+ g_value_unset(&strvalue);
+ }
+ break;
case PROP_CONNECTED:
g_value_set_boolean (value, priv->watcher_proxy != NULL ? TRUE : FALSE);