41 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
bf988ad274 Updates font management for hidpi
Improvements:
- Cleanup of default options files to use OS font by default
- Comments updates
- Simplify font size management as Pango/Gtk directly manage pt/px conversions

Bug fix:
- If Preference panel is closed by "cancel", font size was not reinitialized to previously saved one
- Font size was specified in "RawTherapee.css" theme and so user choice could be ignored
2023-08-23 13:43:07 +02: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
luzpaz
22f89bc752
Fix various typos (#6332)
* Fix various typos

Found via `codespell -q 3 -S ./rtdata/languages -L ba,bord,childs,hist,fo,reall,bloc,alph,dof,inout,thre,makro,chang,currentry,preserv,portugues,struc,trough,vektor`

* Fix source typo

* Added requested revisions
2021-08-13 14:37:29 +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
e5258e6f60 reduce rtgui/inspector.h dependencies 2019-11-08 20:22:18 +01:00
Ingo Weyrich
e682b364b5 Further reduction of include dependencies 2019-11-01 14:51:33 +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
0f0dc03849 Fix broken thumbnail butto tooltips 2019-07-29 15:21:23 +02:00
Ingo Weyrich
cbb3f05b7e use empty() instead of comparison with an empty string 2019-07-22 13:49:08 +02:00
Ingo Weyrich
d9c93e77ae filecatalog/filebrowser: further optimizations 2019-07-19 23:45:02 +02:00
Morgan Hardwood
9c73e60969 Always show filename in the thumb tooltip, #4672
Always show the filename in the thumbnail tooltip since the filename
displayed under/over a thumbnail could be truncated.
If "Show Exif info" is disabled, also show Exif info in the tooltip.
2018-07-08 12:22:32 +02:00
Flössie
579aae510c Consider integers only (#2467) 2018-05-18 20:00:40 +02:00
Flössie
70eefd049b Tidy negative number parsing relict 2018-05-16 20:09:39 +02:00
Flössie
66bbab9ae2 Sort file numbers naturally (#2467) 2018-05-16 19:53:10 +02:00
heckflosse
dc248860a1 remove unused variable 2017-11-25 12:18:20 +01:00
heckflosse
4bad4df2d7 when using SETM thumbs are recomputed when switching between File browser and Editor (Filmstrip) even if SameThumbSize=1 in preferences, fixes #4194. Thanks to @Hombre57 for the fix 2017-11-22 01:32:39 +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
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
ebbb44c3f5 Cleanup for last commit 2017-06-25 21:42:43 +02:00
heckflosse
e4c75c4d38 Fixes #3908, Large memory leak when switching folder in file browser 2017-06-24 22:40:41 +02: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
Morgan Hardwood
0dbea030cb Merge branch 'master' into gtk3-merge-master-b8eb349 2016-10-10 23:07:41 +02:00
heckflosse
566d4c9822 Cppcheck: Fixed most issued in rtgui/* 2016-10-04 23:28:19 +02: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
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
Hombre
48f0225104 Fixing rendering loop in the FileBrowser, based on a suggestion from
Adam
2015-12-05 01:27:39 +01:00
Hombre
72acf67304 Issue 2990: workaround for
style->get_background_color(Gtk::STATE_FLAG_SELECTED) which is not
handled properly by Gtk3
2015-11-30 01:26:00 +01:00
Hombre
9cac516219 Complement bugfix of issue 2990: "Memory leak when using Gtk+-3.18.2",
on behalf of adamreichold
2015-11-29 14:09:32 +01:00
Hombre
6d447f7e02 Issue 2990: Fix possible memory leak ; at least, let the Windows version
w/ Gtk3.18 start w/o crashing
2015-11-29 02:41:07 +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