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,17 @@ 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 , * name_b = NULL ;
381+ name_a = g_mount_get_name (G_MOUNT (a ));
382+ name_b = g_mount_get_name (G_MOUNT (b ));
383+
384+ return g_utf8_collate (name_a , name_b );
385+ }
386+
376387static PlaceInfo *
377388new_place_info (PlaceType place_type ,
378389 SectionType section_type ,
@@ -1254,7 +1265,7 @@ update_places (NemoPlacesSidebar *sidebar)
12541265
12551266 g_list_free_full (network_volumes , g_object_unref );
12561267
1257- network_mounts = g_list_reverse (network_mounts );
1268+ network_mounts = g_list_sort (network_mounts , sort_mounts_func );
12581269 for (l = network_mounts ; l != NULL ; l = l -> next ) {
12591270 mount = l -> data ;
12601271 root = g_mount_get_default_location (mount );
You can’t perform that action at this time.
0 commit comments