[gnome-software] sources dialog: Tweak sorting a bit more
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] sources dialog: Tweak sorting a bit more
- Date: Mon, 25 May 2015 21:36:50 +0000 (UTC)
commit 4c33cfa886f12beb44e1ee3694ee9390f1191013
Author: Kalev Lember <kalevlember gmail com>
Date: Mon May 25 23:33:09 2015 +0200
sources dialog: Tweak sorting a bit more
This makes sorting case-insensitive, and also makes sure the sort key is
available early enough for sorting to work when listing the apps
installed from a particular source.
src/gs-sources-dialog.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index 6985a9b..c93042d 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -142,7 +142,7 @@ add_source (GtkListBox *listbox, GsApp *app)
g_object_set_data_full (G_OBJECT (box),
"sort",
- g_strdup (gs_app_get_name (app)),
+ g_utf8_casefold (gs_app_get_name (app), -1),
g_free);
gtk_list_box_prepend (listbox, box);
@@ -256,15 +256,15 @@ add_app (GtkListBox *listbox, GsApp *app)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
- gtk_list_box_prepend (listbox, box);
- gtk_widget_show (widget);
- gtk_widget_show (box);
-
g_object_set_data_full (G_OBJECT (box),
"sort",
- g_strdup (gs_app_get_name (app)),
+ g_utf8_casefold (gs_app_get_name (app), -1),
g_free);
+ gtk_list_box_prepend (listbox, box);
+ gtk_widget_show (widget);
+ gtk_widget_show (box);
+
row = gtk_widget_get_parent (box);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]