[gnome-software/gnome-3-14] sources dialog: Tweak sorting a bit more



commit 7a1a95775d919e2d7def24575fd9746a4d451f30
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 2845334..c67fbc8 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -119,7 +119,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);
@@ -229,15 +229,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]