31 Commits

Author SHA1 Message Date
Stephen Shkardoon
23f2a2fc9f Use _WIN32 instead of WIN32 to detect Windows
`WIN32` is not defined when building a 64-bit executable on Windows with Clang. `_WIN32` is the more appropriate option here.
http://web.archive.org/web/20191012035921/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system contains a handy table/matrix of the options and why this is best.
2023-08-13 17:09:49 +12:00
Flössie
a07c38f405 Support for saving TIFFs as BigTIFF (#6690) 2023-03-01 12:47:55 +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
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
41fc34c5c6 Do not assign empty strings on creation of std::string or Glib::ustring 2019-07-31 20:21:16 +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
Oleg Koncevoy
d2e6a3a44a Fixed file overwite from queued items 2019-03-21 19:32:31 +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
5ea0bacddd Icons are resized depending on the current scale/resolution
See issue #3547 and #4803
2018-12-08 22:48:15 +01:00
Hombre
4eb8a8f70c Adding HiDPI support (WIP) 2018-10-25 20:22:33 +02:00
Hombre
fe2f45dff2 Merge branch 'dev' into 32b-tiff-output-cli 2018-07-22 18:14:38 +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
Hombre
30efa5930d 16-bit floating-point support for TIFF output image (see #2357) 2018-05-07 09:57:53 +02:00
heckflosse
5ddd42f721 Faster png save with still good compression, fixes #4045 2017-11-18 12:56:37 +01:00
Flössie
071e19bfd9 Don't access job in BatchQueue::saveBatchQueue() (fixes #4183) 2017-11-17 16:43:17 +01:00
Alberto Griggio
6fe04e3990 fixed warnings in rtgui 2017-04-01 15:55:39 +02: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
Morgan Hardwood
040962c1b7 Merge branch 'master' into gtk3 2016-07-09 23:49:31 +02:00
heckflosse
c8779c04f5 Fix all - 2 cppcheck performance hints 2016-07-06 13:04:24 +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
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