From 306a78b6a438f0702d7f8475e726de53a7a7b66c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 9 Jul 2010 16:29:22 -0500 Subject: When we have new apps we can ask the approver about them. --- src/application-service-appstore.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) -- cgit v1.2.3