37 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
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
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
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
Ingo Weyrich
9a4ade6f20 devirtualize method calls by declaring classes and methods final 2020-01-23 22:18:46 +01:00
Ingo Weyrich
04b08741ee Further cleanups 2019-11-27 18:55:20 +01:00
Ingo Weyrich
79431ffa1d Some changes suggested by @Floessie 2019-11-26 19:42:48 +01:00
Ingo Weyrich
b3b1008270 Further reduction of include dependencies 2019-11-02 17:29:26 +01:00
Ingo Weyrich
e682b364b5 Further reduction of include dependencies 2019-11-01 14:51:33 +01:00
Flössie
add5c790d6 #pragma once for our headers plus drive-by formatting 2019-10-31 10:20:50 +01:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Ingo Weyrich
2accd75bd0
Merge pull request #5396 from Beep6581/cppcheck
Cppcheck fixes
2019-08-07 18:28:20 +02:00
Ingo Weyrich
46cbb652d5 cppcheck: further fixes 2019-08-01 14:02:38 +02:00
Ingo Weyrich
de963c54de Further speedups for filebrowser/catalog 2019-07-27 17:39:16 +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
Morgan Hardwood
df2c6b0bcb Default to using defaults by default 2019-03-10 23:49:28 +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
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
Flössie
c85dc2811b Fix most Clang 7 warnings (fixes #4972) 2019-02-17 12:07:48 +01:00
Flössie
b08fb04dae Convert almost all IdleRegister::add() calls to add(std::function<>) 2019-01-01 15:53:39 +01:00
heckflosse
831e18ca45 Add override keyword. Thanks @Floessie 2018-11-22 16:19:16 +01:00
Flössie
2125f42116 Turn almost all Listeners into abstract interfaces 2018-10-09 20:32:40 +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
heckflosse
dfdf4bf39d Fix Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. when selecting Open with windows default viewer (queue processed) and file is not queue processes (Windows only), fixes #4539 2018-05-09 22:28:59 +02:00
Alberto Griggio
2edd677d1a Fixed various memory leaks as reported by AddressSanitizer 2017-06-07 10:36:28 +02:00
Hombre
fb5466bc8c Code reorganization to enable Dynamic profile with rt-cli (#3691) 2017-04-25 00:50:18 +02:00
Flössie
f114b1151f Merge branch 'dev' into idle_harder 2017-03-30 21:44:31 +02:00
Flössie
91b44dbd08 Replace all g_idle_adds with IdleRegister (#3767) 2017-03-26 22:03:33 +02:00
Alberto Griggio
e0d9090420 Changed "Processing profile operations -> Custom Profile Builder" to "Reset to default profile"
The behaviour has changed slightly, so that clicking the menu item now resets
to the default processing profile specified in the preferences. If this
involves calling the custom profile builder, the behaviour is the same as
before. But this is a bit more general, in that it might also simply reapply
the static default profile, or regenerate the dynamic one (depending on the
user's settings)
2017-03-13 23:24:12 +01:00
Adam Reichold
a04c7706db Merge branch 'master' into 'gtk3' 2016-03-05 13:11:00 +01:00
Adam Reichold
e853629854 Move the external command helper into the external program store singleton. 2016-02-21 10:12:56 +01:00
Adam Reichold
375ed172e0 Also fix the missing parent window for the partial-paste and the save-as dialogs. 2016-01-10 18:07:06 +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