aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-10 14:41:53 -0500
committerTed Gould <ted@gould.cx>2010-08-10 14:41:53 -0500
commitc27a7a980337e5216abe0ba0e77c94cf83d2fe43 (patch)
tree45ebf03030179ccc99aca3da881567e9fa1d0b7a
parent09e6c21971ee0c93b72ed8386911875c3f630a1c (diff)
downloadlibayatana-appindicator-c27a7a980337e5216abe0ba0e77c94cf83d2fe43.tar.gz
libayatana-appindicator-c27a7a980337e5216abe0ba0e77c94cf83d2fe43.tar.bz2
libayatana-appindicator-c27a7a980337e5216abe0ba0e77c94cf83d2fe43.zip
Setting the ordering ID.
-rw-r--r--src/application-service-appstore.c8
1 files changed, 8 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
#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);