111 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
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
f564394bbc
dfmanager cleanup (#6211)
* Turn `DFManager` into a singleton
* PIMPL `DFManager`
* Cleanup namespace usage in `dfmanager.cc`
* Constify `DFManager` interface
* Fix bad `reinterpret_cast` between `std::string` and `Glib::ustring`

Co-authored-by: Flössie <floessie.mail@gmail.com>
Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
2022-08-18 17:00:49 +02:00
Lawrence Lee
d3b67c1e22 Fix empty dialog messages
Escape ampersands and angle brackets in some Gtk::MessageDialogs.
Closes #6306.
2021-08-15 12:23:29 -07:00
Lawrence37
22f5a90cb1
Merge pull request #6222 from Beep6581/inspector-window-fixes
Inspector window fixes
2021-05-31 11:27:26 -07:00
Lawrence Lee
9df34be6cb Hide inspector accelerator in film strip
Only show the accelerator key in the context menu when opening the menu
from the full file browser but not the film strip.
2021-05-08 12:15:58 -07:00
Lawrence Lee
36cb32b31b Make inspector window size consistent 2021-05-08 11:48:18 -07:00
Pandagrapher
1c9d1f522c Locallab - Fix bad syntax in LocallabParamsEdited vector resize 2021-05-07 18:47:14 +02:00
Lawrence Lee
d4bceb5c06 Pin inspector window if opened with context menu 2021-04-25 17:27:57 -07:00
Lawrence Lee
78209d3c96 Fix color label with default profile bug
Prevent the color label, rating, and trash status from being reset when
resetting a photo to the default processing profile.

Closes #5936.
2021-01-24 18:10:02 -08:00
rfranke
e63b800864 Re-add inspector tab as an option (#5867)
- 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
2020-08-11 18:27:50 +02:00
rfranke
a449a01690 Extend context menu of filebrowser with inspect entry (#5867)
This opens a popup inspector window at the current mouse position.
2020-08-09 17:21:15 +02:00
Pandagrapher
4ea4663e34 Merge with 'dev/newlocallab'... 2020-04-16 16:01:53 +02:00
Pandagrapher
209eccba8a Add improved copy/paste or save/load for Locallab spots
Preliminary work: "nbspot" and "id" spot parameters have been removed to
simplify Locallab spots management.
2020-02-20 20:35:29 +01:00
Desmis
d645dc5951 merge with dev 2019-11-28 06:50:05 +01:00
Ingo Weyrich
79431ffa1d Some changes suggested by @Floessie 2019-11-26 19:42:48 +01:00
Ingo Weyrich
2a4891827d Some cleanups 2019-11-26 15:25:11 +01:00
Ingo Weyrich
033d9fe02a Merge branch 'dev' into newlocallab 2019-11-04 23:01:33 +01:00
Ingo Weyrich
c1f9120ef4 Further reduction of include dependencies 2019-11-01 21:20:52 +01:00
Ingo Weyrich
e682b364b5 Further reduction of include dependencies 2019-11-01 14:51:33 +01:00
Ingo Weyrich
ba8dda1836 Further cleanup of include dependencies 2019-10-30 16:38:02 +01:00
Ingo Weyrich
068847eb5a Further cleanup of include dependencies 2019-10-29 21:06:27 +01:00
Desmis
0711373021 Merge with dev 2019-09-11 08:35:25 +02:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Desmis
48a5d27601 merge with dev 2019-08-18 18:17:54 +02:00
Ingo Weyrich
ee38731328
fixes #5416 2019-08-18 10:44:59 +02:00
Desmis
7ed4c4422a merge with dev 2019-08-17 06:47:28 +02:00
Ingo Weyrich
b3e0013e56 Merge branch 'dev' into newlocallab 2019-08-08 16:18:58 +02:00
Ingo Weyrich
4bf4b818c0 cppcheck fixes 2019-08-08 13:41:14 +02:00
Desmis
f7a3e96900 merge with dev 2019-07-31 06:38:11 +02:00
Ingo Weyrich
c82aafb748 Merge branch 'dev' into filebrowser-catalog-speedups 2019-07-30 16:16:46 +02:00
Ingo Weyrich
f85de946e6 Fix some corner cases in thumb selection, #5393 2019-07-30 14:44:18 +02:00
Ingo Weyrich
6b868a8d4d Make thumbnail range-selection more similar to OS behaviour, fixes #5393 2019-07-30 13:22:15 +02:00
Ingo Weyrich
4e4106b4e7 Minor cleanups 2019-07-29 14:41:36 +02:00
Ingo Weyrich
de963c54de Further speedups for filebrowser/catalog 2019-07-27 17:39:16 +02:00
Desmis
779ae39f17 merge with dev 2019-07-23 06:40:40 +02:00
Ingo Weyrich
bbdd774afb Further speedups for filebrowser 2019-07-17 21:29:24 +02:00
Desmis
00bbccf1c6 merge with dev 2019-05-25 16:49:21 +02:00
Morgan Hardwood
853b198b1e Clarify what is being deleted in Trash, fixes #5337
The message shown when deleting items in trash was ambiguous.
2019-05-24 16:46:51 +02:00
Desmis
a23c9073b5 merge with dev 2019-04-02 10:56:34 +02:00
Morgan Hardwood
aa379308e3 Tweaked filmstrip scrolling to be less jumpy
Now the centering a thumb happens only if less than half of the next/prev
thumbnail is visible. #5174
2019-04-01 12:46:56 +02:00
heckflosse
020204e0cb Merge branch 'dev' into newlocallab 2019-03-12 14:57:17 +01:00
Beep6581
038207235e
Merge pull request #5183 from Beep6581/centeredthumb
Center selected thumb in Filmstrip #5174
2019-03-11 19:49:10 +01:00
Morgan Hardwood
b29651c5f2 Makes Next/Prev buttons work same as F3/F4 #5183 2019-03-10 23:26:17 +01:00
Morgan Hardwood
2155cf76f0 Refactored as suggested by Floessie #5183 2019-03-10 22:29:32 +01:00
Flössie
57d030881d More procparams.h relaxation 2019-03-01 17:40:02 +01:00
Morgan Hardwood
d080bba351 Center selected thumb in Filmstrip #5174
When opening an image, selecting the next/previous image or syncing the
Filmstrip, the newly selected thumbnail is centered, unless it lies
within the visible area more than 1 thumbnails-width away from either
edge, in which case centering does not occur.
2019-02-18 03:10:58 +01:00
Desmis
63f6c26f70 merge with dev - thanks to Floessie 2019-01-26 08:34:50 +01:00
Pandagrapher
7ccd901ad1 Merge with branch newlocallab... 2019-01-05 18:07:51 +01:00
Flössie
b21d910573 Remove legacy IdleRegister::add<>() 2019-01-01 20:58:26 +01:00