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



commit cd211b8ab5a5699ba0c7e9b03262b2d188954408
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 ca17561..573b439 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -140,7 +140,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);
@@ -249,15 +249,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]