From c27a7a980337e5216abe0ba0e77c94cf83d2fe43 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 10 Aug 2010 14:41:53 -0500 Subject: Setting the ordering ID. --- src/application-service-appstore.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/application-service-appstore.c') diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index cd827d3..4ae316c 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -32,6 +32,7 @@ with this program. If not, see . #include "dbus-properties-client.h" #include "dbus-shared.h" #include "notification-approver-client.h" +#include "generate-id.h" /* DBus Prototypes */ static gboolean _application_service_server_get_applications (ApplicationServiceAppstore * appstore, GPtrArray ** apps, GError ** error); @@ -264,6 +265,13 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err app->icon_theme_path = g_strdup(""); } + gpointer ordering_index_data = g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ORDERING_INDEX); + if (ordering_index_data == NULL || g_value_get_uint(ordering_index_data) == 0) { + app->ordering_index = generate_id(string_to_status(app->category), app->id); + } else { + app->ordering_index = g_value_get_uint(ordering_index_data); + } + /* TODO: Calling approvers, but we're ignoring the results. So, eh. */ g_list_foreach(priv->approvers, check_with_old_approver, app); -- cgit v1.2.3