* Use mtime as fallback timestamp for files without EXIF data
As suggested in #6449, with date-based sorting it can be useful to have
at least *some* sort of time-relevant information for EXIF-less files,
to prevent them from falling back to getting sorted alphabetically all
the time.
This commit simply defaults the file timestamp to the file's mtime as
returned by g_stat. For annoying reasons, it doesn't suffice to merely
forward the timestamp to the FileData structs - we also need to keep
track of it inside FilesData to cover the case of a file with 0 frames
in it.
* Add DateTime to Thumbnail
Putting it here facilitate easier sorting without having to re-construct
the DateTime on every comparison.
To simplify things moving forwards, use the Glib::DateTime struct right
away. This struct also contains timezone information, but we don't
currently care about timezone - so just use the local timezone as the
best approximation. (Nothing currently depends on getting the timezone
right, anyway)
In addition to the above, this commit also changes the logic to allow
generating datetime strings even for files with missing EXIF (which
makes sense as a result of the previous commit allowing the use of mtime
instead).
* Implement file sorting in thumbnail view
For simplicity, I decided to only implement the attributes that I could
verily easily reach from the existing metadata exported by Thumbnail.
Ideally, I would also like to be able to sort by "last modified" but I'm
not sure of the best way to reach this from this place in the code.
It's worth pointing out that, with the current implementation, the list
will not dynamically re-sort itself until you re-select the sorting
method - even if you make changes to the files that would otherwise
affect the sorting (e.g. changing the rank while sorting by rank). One
might even call this a feature, not a bug, since it prevents thumbnails
from moving around while you're trying to re-label them. You can always
re-select "sort by ..." from the context menu to force a re-sort.
Fixes#3317
Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
* Improves RT window events detection and RT window position computation
* Fixes some limitations in specific cases for Windows and MacOS
* Fixes RT window not restoring saved position at startup
- When maximized at startup, RT window position wasn't restored from
options file. So when unmaximazing RT, position was set to up left
corner instead of restored one
- Other fix: Removed some uses of deprecated Gtk functions
* Improves RT window management for independant edit window mode
Other fixes:
- Monitor ID wasn't correctly computed
- Removes some other deprecated functions uses
- Removes debug printf
* Fixes editor window aspects not restored in MEOW mode on Linux
Other fixes:
- Removes some Gtk warnings when adding a new editor panel in MEOW mode
- Adds robustness to avoid RT windows outside screen at startup loading
corrupted options file with negative position values
* Fixes incorrect max position saturation in dual screen configurations
Introduces "long edge" and "short edge" options to resize an image. The GUI is made such that the relevant spinboxes only appear for the selected option. Unrelated values (e.g. for box-mode) are not updated.
* import and change the art code -thanks to Alberto
* Possible fixed for white space in folder
* Added verbose when white-space
* Replace WS only if windows and Gimp
* Fixed Windows and Gimp bug for external editor - thanks to Lawrence37
* Fix LGTM alert for reused variable name
Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
Previously, changing to a different scope was done by clicking the scope
type button and cycling through all scopes. This commit decreases the
number of clicks needed to switch between two scopes by adding a radio
selector. The radio buttons can be shown or hidden by pressing the scope
type button. This commit also makes the raw histogram one of the scope
types.
- add option "inspectorWindow" to switch from tab to fullscreen view
- add option "zoomOnScroll" to configure scroll device for zoom or pan
- add both options to preferences
- filepanel creates tab if not inspectorWindow
- inspector adapts to settings inspectorWindow and zoomOnScroll
- filebrowser shows context menu item for inspector only if inspectorWindow
* update macOS autobuild yaml
* updates */CMakeLists* for macOS autobuild compatibility
* "" a dir for cmake
* Un empty an empty EXTRA_INCDIR
* use a cmake operator
* Use the . dir to un-empty a string
* fix minutes timer in macos yaml
* test & skip instead of load & include
* disregard fractional part of minutes in mac yaml
* add another cmake test
* fix typo in mac yaml
* fix other part of same typo
* correct a filename in mac yaml
* test all include dirs
* fix of mac yaml
* mac:fix a path in yaml
* mac:and its antecedent
* options.h include a dir
* test __has_include (gcc 5.* & up & clang)
* remove a printf() in mac yaml
* mac:change a "" and an elseif() to else()
* fix a whitespace error
* fix 2 whitespace errors
* ZULU>UTC
* add a "UTC
* on the other side of the "
* mac:properly set default LOCAL_PREFIX in CACHE
* use of zsh subshells in macos yaml
* mac:remove some &&
* mac:remove some "
* mac:floating point divisors
* mac:use double paren (())
* mac:add a dir
* mac:floatize with decimal point
* mac:zsh -c certain lines
* remove a marker
The `version` value from the `Options` file is compared to the harcoded
value (computed at build time) of the running application. If the major
or minor version is different, the `svg2png` folder is cleaned at
startup-time.