diff options
author | Ted Gould <ted@gould.cx> | 2010-07-09 16:29:22 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-07-09 16:29:22 -0500 |
commit | 306a78b6a438f0702d7f8475e726de53a7a7b66c (patch) | |
tree | 147a7a6403a60450213cedd3f0fbc0d7c2d23c5b /src/application-service-appstore.c | |
parent | b3a0f3e22a8ec154dd738019fbf3dff346188aee (diff) | |
download | libayatana-appindicator-306a78b6a438f0702d7f8475e726de53a7a7b66c.tar.gz libayatana-appindicator-306a78b6a438f0702d7f8475e726de53a7a7b66c.tar.bz2 libayatana-appindicator-306a78b6a438f0702d7f8475e726de53a7a7b66c.zip |
When we have new apps we can ask the approver about them.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r-- | src/application-service-appstore.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 3e4fd15..311fcb1 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -102,6 +102,8 @@ static void application_service_appstore_finalize (GObject *object); static AppIndicatorStatus string_to_status(const gchar * status_string); static void apply_status (Application * app, AppIndicatorStatus status); static void approver_free (gpointer papprover, gpointer user_data); +static void check_with_new_approver (gpointer papp, gpointer papprove); +static void check_with_old_approver (gpointer papprove, gpointer papp); G_DEFINE_TYPE (ApplicationServiceAppstore, application_service_appstore, G_TYPE_OBJECT); @@ -251,11 +253,23 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err app->icon_path = g_strdup(""); } + /* TODO: Calling approvers, but we're ignoring the results. So, eh. */ + g_list_foreach(priv->approvers, check_with_old_approver, app); + apply_status(app, string_to_status(g_value_get_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_STATUS)))); return; } +/* Check the application against an approver */ +static void +check_with_old_approver (gpointer papprove, gpointer papp) +{ + /* Funny the parallels, eh? */ + check_with_new_approver(papp, papprove); + return; +} + /* Simple translation function -- could be optimized */ static AppIndicatorStatus string_to_status(const gchar * status_string) |