From d0c45f19b82b3fc9541674b72fb8b08083f0ee1c Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Fri, 21 Aug 2015 14:49:11 +0200 Subject: [PATCH] gtkplacesview: use g_utf8_collate for sorting Also rename the variable, since we usually use location for GFiles variables. --- gtk/gtkplacesview.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c index deece3e3a0..60ee5f69f7 100644 --- a/gtk/gtkplacesview.c +++ b/gtk/gtkplacesview.c @@ -2001,8 +2001,8 @@ listbox_sort_func (GtkListBoxRow *row1, { gboolean row1_is_network; gboolean row2_is_network; - gchar *location1; - gchar *location2; + gchar *path1; + gchar *path2; gboolean *is_placeholder1; gboolean *is_placeholder2; gint retval; @@ -2026,13 +2026,13 @@ listbox_sort_func (GtkListBoxRow *row1, if (is_placeholder2) return 1; - g_object_get (row1, "path", &location1, NULL); - g_object_get (row2, "path", &location2, NULL); + g_object_get (row1, "path", &path1, NULL); + g_object_get (row2, "path", &path2, NULL); - retval = g_strcmp0 (location1, location2); + retval = g_utf8_collate (path1, path2); - g_free (location1); - g_free (location2); + g_free (path1); + g_free (path2); return retval; }