This allows to add new pages after clearing without triggering an empty
state in between. This also fixes opening a new image leaving the
fullscreen mode.
Fixes#286
Fix issue in previous commit when having multiple windows.
Steps to reproduce:
- enable properties in window A and window B doesn't have them enabled
- switch an image in window B
- the properties would be shown
Co-authored-by: Sophie Herold <sophie@hemio.de>
Added GSettings support to Loupe. Inspiration was taken from Fractal:
LpApplication will contain `gio::Settings` and all code needing them
will reach them as a singleton by calling `g_application_get_default`.
This design makes the settings dependency less explicit than dependency
injection, but allows for shorter code when new settings will be added
across different parts of the application.
A `show-properties` setting is added for remembaring the image property
sidebar state. It's read by LpWindow when the current page changes, and
saved when toggling the sidebar. When no image is being shown, the
sidebar is always hidden, while the setting remains unchanged. The
sidebar state will be restored when a picture is opened.
Closes#147
`GdkSurface:scale` supports fractional scaling available as
"scale-monitor-framebuffer" on Mutter. Use this value everywhere
instead of the integer scale-factor
Closing #182
LpImage already reloads the image after an image is
invalid because of unsupported format or decoding error.
This patch makes that the "is-loaded" property is changed
to true again after the problem is resolved by a file change.
This should also hopefully works around problems with apps like GIMP
writing files in a way where an error appears itermittently.
Closes#256
The files are stored in an index map.
When removing from that map, `remove` does not guarantee to preserve order.
However `shift_remove` does.
Fixes#270
Use a hack to wait in print signal for the layout dialog to be ready
instead of creating a new print operation with the same settings.
This works around a bug in GTK where the wrong printer gets selected
(issue #243), as well as the print dialog getting shown twice when
using the print portal (part of #61).
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/302>
This got lost with having a custom "accept" signal handler since
the signal uses g_signal_accumulator_first_wins. Fixing this also
works around GTK not properly checking the drops and ending up
in criticals.
Fixes#234