aboutsummaryrefslogtreecommitdiff
path: root/src/application-service-appstore.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-08 10:18:57 -0600
committerTed Gould <ted@gould.cx>2010-01-08 10:18:57 -0600
commita5753822cc80f3f579aa61801b54134b3baa8076 (patch)
tree1420a809e796c5af35fd2f4656f11b60eec12c4d /src/application-service-appstore.c
parent1c834b9b1e97a7a2ef552a5cdff726f3d4e6194a (diff)
parent8226d6c8f8870be9d2902fcd2137b242f2559da8 (diff)
downloadlibayatana-appindicator-a5753822cc80f3f579aa61801b54134b3baa8076.tar.gz
libayatana-appindicator-a5753822cc80f3f579aa61801b54134b3baa8076.tar.bz2
libayatana-appindicator-a5753822cc80f3f579aa61801b54134b3baa8076.zip
Adding in the ability for applications to specify a directory path to get added to the icon theme search path.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r--src/application-service-appstore.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 1391d33..f76bbe2 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -40,6 +40,7 @@ static gboolean _application_service_server_get_applications (ApplicationService
#define NOTIFICATION_ITEM_PROP_STATUS "Status"
#define NOTIFICATION_ITEM_PROP_ICON_NAME "IconName"
#define NOTIFICATION_ITEM_PROP_AICON_NAME "AttentionIconName"
+#define NOTIFICATION_ITEM_PROP_ICON_PATH "IconThemePath"
#define NOTIFICATION_ITEM_PROP_MENU "Menu"
/* Private Stuff */
@@ -93,8 +94,8 @@ application_service_appstore_class_init (ApplicationServiceAppstoreClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ApplicationServiceAppstore, application_added),
NULL, NULL,
- _application_service_marshal_VOID__STRING_INT_STRING_STRING,
- G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_NONE);
+ _application_service_marshal_VOID__STRING_INT_STRING_STRING_STRING,
+ G_TYPE_NONE, 5, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_NONE);
signals[APPLICATION_REMOVED] = g_signal_new ("application-removed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
@@ -179,12 +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)),
+ icon_path,
TRUE);
return;