[gnome-control-center] search: don't keep the last panel last in the sort order
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] search: don't keep the last panel last in the sort order
- Date: Tue, 2 Apr 2013 19:46:39 +0000 (UTC)
commit 3969c81c244dd4c78a3c7a59c3eaafafe83b0821
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Mar 2 02:10:04 2013 +0100
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
panels/search/cc-search-panel.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index fc010bb..97dd8a5 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]