diff options
author | Ted Gould <ted@gould.cx> | 2010-01-06 14:27:33 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-06 14:27:33 -0600 |
commit | eec24665dda2d3968984141f2d1e07289d10bf79 (patch) | |
tree | 22e9ae392e813acc67834a4ef097b2aa48c12678 /src/application-service-appstore.c | |
parent | 150a0d7bf767736905bed4d9e4d10e2f235f1be5 (diff) | |
download | libayatana-appindicator-eec24665dda2d3968984141f2d1e07289d10bf79.tar.gz libayatana-appindicator-eec24665dda2d3968984141f2d1e07289d10bf79.tar.bz2 libayatana-appindicator-eec24665dda2d3968984141f2d1e07289d10bf79.zip |
Handle the case of no icon path more gracefully, by just passing along the null string.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r-- | src/application-service-appstore.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 92e5668..c9da491 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -180,13 +180,21 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err would involve looking at the name and category and sorting it with the other entries. */ + const gchar * icon_path = NULL; + gpointer icon_path_data = g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_PATH); + if (icon_path_data != NULL) { + icon_path = g_value_get_string((GValue *)icon_path_data); + } else { + icon_path = ""; + } + g_signal_emit(G_OBJECT(app->appstore), signals[APPLICATION_ADDED], 0, g_value_get_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_NAME)), 0, /* Position */ app->dbus_name, g_value_get_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_MENU)), - g_value_get_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_PATH)), + icon_path, TRUE); return; |