From 8be6fe7ae76d822cc8737f60b3c0ad930f371eb0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 10 Feb 2010 08:30:42 -0600 Subject: Falling back on string if that's what we get. Makes things compatible. --- src/application-service-appstore.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.3