diff options
author | Ted Gould <ted@gould.cx> | 2010-02-10 08:30:42 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-10 08:30:42 -0600 |
commit | 8be6fe7ae76d822cc8737f60b3c0ad930f371eb0 (patch) | |
tree | 2367e5a903b489c51245033b44950d59a0e6a9a2 | |
parent | 28b0ba50227548758db097d0c6097b1a394e413f (diff) | |
download | ayatana-indicator-application-8be6fe7ae76d822cc8737f60b3c0ad930f371eb0.tar.gz ayatana-indicator-application-8be6fe7ae76d822cc8737f60b3c0ad930f371eb0.tar.bz2 ayatana-indicator-application-8be6fe7ae76d822cc8737f60b3c0ad930f371eb0.zip |
Falling back on string if that's what we get. Makes things compatible.
-rw-r--r-- | src/application-service-appstore.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 5e0c601..5e6a356 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -224,7 +224,13 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err app->icon = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_NAME)); GValue * menuval = (GValue *)g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_MENU); - app->menu = g_strdup((gchar *)g_value_get_boxed(menuval)); + if (G_VALUE_TYPE(menuval) == G_TYPE_STRING) { + /* This is here to support an older version where we + were using strings instea of object paths. */ + app->menu = g_value_dup_string(menuval); + } else { + app->menu = g_strdup((gchar *)g_value_get_boxed(menuval)); + } if (g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_AICON_NAME) != NULL) { app->aicon = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_NAME)); |