49 Commits

Author SHA1 Message Date
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
Ingo Weyrich
8bd9bddfc7
New crop guide: square center, closes #6342 (#6345)
* New crop guide: square center, closes #6342

* Turn `CropParams::guide` into an `enum`

This saves recurring string comparisons.

Co-authored-by: Flössie <floessie.mail@gmail.com>
2021-08-25 15:25:59 +02:00
Lawrence Lee
58995a052d Properly enable inspector window for film strip 2021-04-25 15:44:49 -07: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
a5c7713042 Cleanup: removed unused function; also murder instead of call for suicide (delete this) 2020-08-13 13:10:33 +02:00
Ingo Weyrich
2a4891827d Some cleanups 2019-11-26 15:25:11 +01:00
Ingo Weyrich
587652283d further reduction of include dependencies, also finalised some classes 2019-11-09 16:51:54 +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
Hombre
ce04447c7a Fix crash while rotating several thumbnails in File Browser
Fix issue #4858 and possibly #5310
2019-09-03 22:18:20 +02:00
Ingo Weyrich
4e4106b4e7 Minor cleanups 2019-07-29 14:41:36 +02:00
Ingo Weyrich
d9c93e77ae filecatalog/filebrowser: further optimizations 2019-07-19 23:45:02 +02:00
Hombre
52dcd08b97 Merge branch 'dev' into hidpi-icons 2019-03-13 01:00:14 +01:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
Hombre
cc1779a0ae Merge branch 'dev' into hidpi-icons 2019-01-24 22:02:44 +01:00
Flössie
b21d910573 Remove legacy IdleRegister::add<>() 2019-01-01 20:58:26 +01:00
Hombre
5ea0bacddd Icons are resized depending on the current scale/resolution
See issue #3547 and #4803
2018-12-08 22:48:15 +01:00
Flössie
5906329485 Review IdleRegister (#4892)
This turns `IdleRegister::add()` into a template function to make the
provided function pointers type safe. It also adds a `delete_data`
parameter to manage the provided data pointer even in `destroy()`.
2018-10-28 13:12:01 +01:00
Hombre
785a0e6a46 Merge branch 'dev' into hidpi-icons 2018-10-25 20:43:41 +02:00
Hombre
4eb8a8f70c Adding HiDPI support (WIP) 2018-10-25 20:22:33 +02:00
Flössie
2125f42116 Turn almost all Listeners into abstract interfaces 2018-10-09 20:32:40 +02:00
heckflosse
04b2d42d46 Segfault when closing rt immediately after using batch edit, fixes #4806 2018-09-15 14:48:51 +02:00
Morgan Hardwood
c9e6a18fb8 Use small thumbnail icon for files in queue 2018-08-06 11:16:09 +02:00
Morgan Hardwood
a0021d3348 Icon tweaks and fixes, #4469
Ticks, used for edited image, are now theme-colored.
Missing ticks and missing CD-ROM icons fixed.
2018-07-17 00:00:32 +02:00
Morgan Hardwood
10af344672 Merge branch 'dev' into iconcleanup4 2018-07-13 18:14:48 +02:00
Morgan Hardwood
522495f4eb Icon cleanup #4469 #3547
Rebased in new branch to cleanup commit history.
2018-07-13 18:13:35 +02:00
Flössie
f9c0669c42 Try to fix thumbbrowser deadlock (#4576) 2018-06-27 20:11:18 +02:00
Alberto Griggio
8168611c23 added preferences to control the behaviour of the crop tool 2018-01-03 15:44:34 +01: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
heckflosse
41d3179f2c remove some gcc4.8/windows special code as minimum gcc version to build rt is 4.9 2017-06-21 01:09:16 +02:00
heckflosse
a9f769c5d7 Fix some coverity issues 2017-06-19 00:57:29 +02:00
heckflosse
642b4cc86c Fix some coverity issues 2017-06-16 21:21:22 +02:00
Alberto Griggio
3c7e797418 allow custom-ratio cropping (by holding shift) also when resizing from the thumbnail 2017-04-11 08:58:59 +02:00
heckflosse
92a46e9a3d Merge branch 'idle_harder' into dev 2017-04-09 02:18:09 +02:00
Alberto Griggio
6fe04e3990 fixed warnings in rtgui 2017-04-01 15:55:39 +02:00
Flössie
6e1f7df2fb Replace g_idle_add_full() with IdleRegister (#3767) 2017-03-30 21:40:09 +02:00
Alberto Griggio
4478c41eed candidate fix for #3087 2017-03-22 12:49:17 +01:00
Flössie
88336cb897 Make RT build without __USE_MISC and __USE_XOPEN 2017-02-14 21:02:39 +01:00
heckflosse
b16ef8d1f5 Merge master into gtk3 2016-10-28 17:59:47 +02:00
Flössie
0731975ff0 Apply modernize-use-nullptr
Setup:
- `mkdir tidy; cd tidy`
- `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`
- `cd ..`
- `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
2016-10-12 17:48:40 +02:00
Adam Reichold
a04c7706db Merge branch 'master' into 'gtk3' 2016-03-05 13:11:00 +01:00
Adam Reichold
13ebcb0dd0 Move image loader helper functions from safegtk to RTImage module. 2016-02-21 09:59:12 +01:00
Beep6581
f5d5083be6 Merged master into gtk3, manually copied rtgui/threadutils.h over from master 2016-01-31 00:00:28 +01:00
Adam Reichold
17d9309f1c Remove PROTECT_VECTORS option since either program is correct without locking or it is not, especially since std::vector is definitely not thread-safe on all major platforms. 2016-01-30 20:39:54 +01:00
Adam Reichold
333f9013dd Pass Cairo context down to child elements instead of recreating it. 2015-12-05 09:14:41 +01:00
Hombre
48f0225104 Fixing rendering loop in the FileBrowser, based on a suggestion from
Adam
2015-12-05 01:27:39 +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