aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-10 21:19:31 -0500
committerTed Gould <ted@gould.cx>2010-08-10 21:19:31 -0500
commit51de4ced42e132fa3a66a2739e8a3ba861842467 (patch)
tree6c6a5103e21d7c3ef7cb1dc90047d88f41eb0a0d
parentde6c40d873a317a98d025cb094e7d89a646b4000 (diff)
downloadlibayatana-appindicator-51de4ced42e132fa3a66a2739e8a3ba861842467.tar.gz
libayatana-appindicator-51de4ced42e132fa3a66a2739e8a3ba861842467.tar.bz2
libayatana-appindicator-51de4ced42e132fa3a66a2739e8a3ba861842467.zip
Checking for an override and applying it.
-rw-r--r--src/application-service-appstore.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 4d21291..d632456 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -346,11 +346,16 @@ 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);
+ gpointer ordering_index_over = g_hash_table_lookup(priv->ordering_overrides, app->id);
+ if (ordering_index_over == NULL) {
+ 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);
+ }
} else {
- app->ordering_index = g_value_get_uint(ordering_index_data);
+ app->ordering_index = GPOINTER_TO_UINT(ordering_index_over);
}
gpointer label_data = g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_LABEL);