Skip to content

Improve Sorting

fabrice salvaire requested to merge fabricesalvaire/gwenview:sorting into master

For review...

The purpose of this patch is to fix the sorting in Gwenview.

I believe Geeqie has a better sorting.

Actually, I am annoyed by these behaviours:

  • Gwenview uses the EXIF date when it is available to sort by date. This feature is a mess when we want to sort by modified date. Despite it can make sense, this feature is not documented. A workaround is to remove the EXIF date, but this is cumbersome.
  • Gwenview gets the sorting from a DBUS query when we open a directory using the method MainWindow::setInitialUrl (a click on a directory in the recent places). This is also a silent behaviour, and it ignores/overwrites the actual Gwenview sorting setup. Thus, this is clearly a bug.
  • Gwenview sorting is hidden in the UI menu, and sometimes it is set silently by DBUS.

This patch

  • implements a Date Modified and EXIF sorting
  • implements an Image Dimension sorting
  • add a prefix label to the sorting action to show which sorting is set
  • disable DBUS query to get the sorting of a directory (don't know what to do...)

I am not sure the image dimension code is the most efficient.

CI pipeline failed, but this patch compiles and works as expected.

TODO: this patch need some clean-up... (logging, Emacs, ...)

Edited by fabrice salvaire

Merge request reports