From: Ray Strode Date: Thu, 9 Mar 2023 20:42:16 +0000 (-0500) Subject: filerchooser: Show Recent files in inverse order X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~5^2~29^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=442fa8d9723ff320993bd4a869c7ec1258c45218;p=gtk4.git filerchooser: Show Recent files in inverse order 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. --- diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 3a0dc6e41b..142daf6e2d 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -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);