[gtk+] gtkplacesview: use g_utf8_collate for sorting



commit d0c45f19b82b3fc9541674b72fb8b08083f0ee1c
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Aug 21 14:49:11 2015 +0200

    gtkplacesview: use g_utf8_collate for sorting
    
    Also rename the variable, since we usually use location
    for GFiles variables.

 gtk/gtkplacesview.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index deece3e..60ee5f6 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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]