File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -373,6 +373,16 @@ sort_places_func (gconstpointer a,
373373 return g_utf8_collate (((PlaceInfo * ) a )-> name , ((PlaceInfo * ) b )-> name );
374374}
375375
376+ static gint
377+ sort_mounts_func (gconstpointer a ,
378+ gconstpointer b )
379+ {
380+ g_autofree gchar * name_a = g_mount_get_name (G_MOUNT (a ));
381+ g_autofree gchar * name_b = g_mount_get_name (G_MOUNT (b ));
382+
383+ return g_utf8_collate (name_a , name_b );
384+ }
385+
376386static PlaceInfo *
377387new_place_info (PlaceType place_type ,
378388 SectionType section_type ,
@@ -1254,7 +1264,7 @@ update_places (NemoPlacesSidebar *sidebar)
12541264
12551265 g_list_free_full (network_volumes , g_object_unref );
12561266
1257- network_mounts = g_list_reverse (network_mounts );
1267+ network_mounts = g_list_sort (network_mounts , sort_mounts_func );
12581268 for (l = network_mounts ; l != NULL ; l = l -> next ) {
12591269 mount = l -> data ;
12601270 root = g_mount_get_default_location (mount );
You can’t perform that action at this time.
0 commit comments