summaryrefslogtreecommitdiff
path: root/panels/search
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2013-03-02 02:10:04 +0100
committerGiovanni Campagna <gcampagna@src.gnome.org>2013-04-02 21:45:47 +0200
commit3969c81c244dd4c78a3c7a59c3eaafafe83b0821 (patch)
tree13a524eb1cfa844eef16166b75e9c0ac91ecaa53 /panels/search
parent9f3ef4b3e7a8711373c31ad61868b1a6d0de1bc8 (diff)
downloadgnome-control-center-3969c81c244dd4c78a3c7a59c3eaafafe83b0821.tar.gz
search: don't keep the last panel last in the sort order
Previously, we kept the last panel in the configured order last, after non configured ones.This would assign a sort order to the last panle that would place it in the middle, but visually sort it last, and that caused problems when moving it (it would jump into an apparently random position in the middle, according to the sort ID, and would move the nearby provider too). https://bugzilla.gnome.org/show_bug.cgi?id=694975
Diffstat (limited to 'panels/search')
-rw-r--r--panels/search/cc-search-panel.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index fc010bbbd..97dd8a521 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -55,7 +55,7 @@ list_sort_func (gconstpointer a,
GtkWidget *widget_a, *widget_b;
GAppInfo *app_a, *app_b;
const gchar *id_a, *id_b;
- gint idx_a, idx_b, num_sorted;
+ gint idx_a, idx_b;
gpointer lookup;
widget_a = GTK_WIDGET (a);
@@ -83,17 +83,6 @@ list_sort_func (gconstpointer a,
if ((idx_a == -1) && (idx_b == -1))
return g_utf8_collate (g_app_info_get_name (app_a), g_app_info_get_name (app_b));
- num_sorted = g_hash_table_size (self->priv->sort_order) - 1;
- if (num_sorted > 1)
- {
- /* if app_a is the last, it goes after everything */
- if (idx_a == num_sorted)
- return 1;
- /* if app_b is the last, it goes after everything */
- else if (idx_b == num_sorted)
- return -1;
- }
-
/* if app_a isn't found, it's sorted after app_b */
if (idx_a == -1)
return 1;