diff options
author | Ray Strode <rstrode@redhat.com> | 2023-03-09 15:42:16 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2023-03-09 15:42:16 -0500 |
commit | 442fa8d9723ff320993bd4a869c7ec1258c45218 (patch) | |
tree | 468853812bc5dc43c8173a07f85d3ce20738b28b /gtk | |
parent | 12858114a291b2e908bb6fdae982b5558c4ceee0 (diff) | |
download | gtk+-442fa8d9723ff320993bd4a869c7ec1258c45218.tar.gz |
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.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |