aboutsummaryrefslogtreecommitdiff
path: root/src/application-service-appstore.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-10 08:32:29 -0600
committerTed Gould <ted@gould.cx>2010-02-10 08:32:29 -0600
commit07cba3340daeb169dc1e2ef28c01bafa7fb60448 (patch)
tree449de2c0731721eb79f523867554d5b04a44421f /src/application-service-appstore.c
parentfb4952bf2d8884ba4ce84db885afb2dc37f653d9 (diff)
parent8be6fe7ae76d822cc8737f60b3c0ad930f371eb0 (diff)
downloadlibayatana-appindicator-07cba3340daeb169dc1e2ef28c01bafa7fb60448.tar.gz
libayatana-appindicator-07cba3340daeb169dc1e2ef28c01bafa7fb60448.tar.bz2
libayatana-appindicator-07cba3340daeb169dc1e2ef28c01bafa7fb60448.zip
Switching menu property to be an object path.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r--src/application-service-appstore.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index c784495..ec6da50 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -222,7 +222,16 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err
app_lru_file_touch(priv->lrufile, app->id, app->category);
app->icon = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_NAME));
- app->menu = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_MENU));
+
+ GValue * menuval = (GValue *)g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_MENU);
+ 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_AICON_NAME));
}