21 Commits

Author SHA1 Message Date
Daniel Gao
711f274403 Get rid of relative include paths
* Use target_include_directories to specify include paths
* Specify project root (parent of rtgui and rtengine) as include path
* Replace relative includes with normal includes
2024-11-16 17:20:02 -05:00
Pandagrapher
c28d5aab97 Merge with "Beep6581/dev" 2023-03-11 11:02:29 +01:00
Niklas Haas
2101b846c3
Implement file sorting in thumbnail view (#6449)
* 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>
2023-01-02 21:27:12 +01:00
Pandagrapher
50e54aa395 Convert remaining RTPixbuf to RTSurface
Changes:
- Remove RTPixbuf use in directory browser to use native GTK mechanism
- Replace RTPixbuf by RTSurface for thumbnail icons
- Remove now useless RTPixbuf class

Fixes:
- Elaborate RTSurface width / height based on the type
2022-08-27 11:37:59 +02:00
Floessie
1318935a87
Better handle thumbnail generation of extreme aspect ratio images (fixes #3794)
* Backport fix taken from ART
* Enforce minimal thumbnail size of 1x1 px in two places, prevents divison by zero and empty image generation
2020-10-25 18:24:30 +01:00
Ingo Weyrich
c1f9120ef4 Further reduction of include dependencies 2019-11-01 21:20:52 +01:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Ingo Weyrich
0f0dc03849 Fix broken thumbnail butto tooltips 2019-07-29 15:21:23 +02:00
Ingo Weyrich
d9c93e77ae filecatalog/filebrowser: further optimizations 2019-07-19 23:45:02 +02:00
Flössie
f9c0669c42 Try to fix thumbbrowser deadlock (#4576) 2018-06-27 20:11:18 +02:00
Hombre57
86dac147c6 Adding icons on thumbnails and solving a bug in cacheimagedata.cc
See issue #4008.
The bug in cacheimagedata.cc was preventing correct cached thumbnail
loading, asking for a full processing at each loading of the directory.
2017-08-13 18:13:39 +02:00
Flössie
c90046db13 Use Glib::ustring::collate_key() for ThumbBrowserEntryBase::operator<()
Kudos to @heckflosse for having a nose for optimizations. 👍

Also kills unused `DirEntry` class.
2017-07-10 21:17:42 +02:00
heckflosse
c30683f5f6 Cleanup for b1dd97d, thanks to Flössie 2017-07-07 12:39:52 +02:00
Morgan Hardwood
0dbea030cb Merge branch 'master' into gtk3-merge-master-b8eb349 2016-10-10 23:07:41 +02:00
heckflosse
3552fd4161 Cppcheck: Fix issues related to explicit constructors 2016-10-03 00:54:02 +02:00
Adam Reichold
8151e0f5ce Merge branch 'master' into 'gtk3'
Most conflicts seemed to be simple enough. There were a lot of `append_text` to
`append` conversions for `Gtk::ComboBoxText`. The `PopUpCommon` class also saw
a lot of changes with non-trivial conflict resolutions.
2016-01-06 23:56:12 +01:00
Adam Reichold
d3ac22531b Extend the file browser so that it will only show the original image if several files of different formats are present. 2015-12-17 20:05:41 +01:00
Adam Reichold
333f9013dd Pass Cairo context down to child elements instead of recreating it. 2015-12-05 09:14:41 +01:00
Morgan Hardwood
56a0805bc7 Gtk3 by Hombre, issue 2807 2015-08-12 16:07:19 +02:00
DrSlony
0e0cfb9b25 Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle 2015-08-11 11:55:03 +02:00
torger
d5ca351c20 Issue 2134: removed obsolete raw highlight preservation setting from GUI (still left in procparams for backwards compatilibility) 2015-07-10 12:00:36 +02:00