filerchooser: Show Recent files in inverse order
authorRay Strode <rstrode@redhat.com>
Thu, 9 Mar 2023 20:42:16 +0000 (15:42 -0500)
committerRay Strode <rstrode@redhat.com>
Thu, 9 Mar 2023 20:42:16 +0000 (15:42 -0500)
When looking at Recent files in the file chooser, it makes more
sense to show the recent files on top.

This commit flips the sort order for that case.

gtk/gtkfilechooserwidget.c

index 3a0dc6e41b0c1c0ffdb578e88cdf1eecdf7eff7f..142daf6e2df3615a342e434e4a1f0092d0c38e59 100644 (file)
@@ -7110,6 +7110,10 @@ recent_sort_func (gconstpointer a,
 
   result = time_sort_func (a, b, user_data);
 
+  /* Recent files should show most recently changed items first
+   */
+  result = -result;
+
   if (result == GTK_ORDERING_EQUAL)
     result = name_sort_func (a, b, user_data);