Commit graph

453 commits

Author SHA1 Message Date
Sophie Herold
c3410943b8 window: Move Ctrl+C (copy) handler here
Closes #583
2026-04-27 13:32:19 +02:00
Sophie Herold
19e0fd7c6e Update copyright comments 2026-02-27 21:03:02 +01:00
Sophie Herold
5ba6cb0954 cargo: Update deps and bump version 2026-02-27 16:50:18 +01:00
Maximiliano Sandoval
d922a033ec edit_window: Remove i==1 branch for ngettext
A message catalog can have at most a single string with a given msgid,
in this case having a branch with gettext and another with ngettext
would result in two strings with " (Edited)" as their msgid.

This can be checked via:

$ meson compile loupe-pot
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja loupe-pot
[0/1] Running external command loupe-pot
/usr/bin/xgettext: warning: msgid ' (Edited)' is used without plural and with plural.
                            src/widgets/edit_window.rs:197: Here is the occurrence without plural.
                            src/widgets/edit_window.rs:200: Here is the occurrence with plural.
                            Workaround: If the msgid is a sentence, change the wording of the sentence; otherwise, use contexts for disambiguation.

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/578>
2026-01-29 23:14:58 +00:00
Sophie Herold
8972c5efb9 code: Use chained if-let's 2026-01-29 23:59:58 +01:00
Sophie Herold
67a233f777 cargo: Update to gtk-rs 0.22/0.11 2026-01-29 23:59:54 +01:00
Sophie Herold
d82c92a516 window: Remove unused shortcuts-dialog shortcut 2026-01-29 23:09:32 +01:00
Abhinandan Thakur
a50212f741 shortcuts-dialog: Port to AdwShortcutsDialog
Changed help-overlay.ui to add adwaita shortcuts dialog and loaded that
xml in window.rs also incremented libadwaita version.

Fixes #521
2026-01-29 23:05:14 +01:00
Sophie Herold
5702f2343d code: Update copyright 2026-01-02 16:25:56 +01:00
Sophie Herold
32a4d0f0aa image/zoom: Allow 50% zoom via menu for 16px images
Zoom out for 16px or smaller images is usually blocked. But allow it for
zoom menu as we allow 50% via zoom menu in other situations where it is
blocked otherwise. Also, this is probably much less complex
implementation wise.

Closes #544
2025-12-23 23:09:39 +01:00
pieterd
f34f9dd988 Constrain minimum zoom level 2025-12-23 22:39:37 +01:00
Sophie Herold
2102b44528 image_view: Limit zoom value digits
Only allow 4 integer digits and 2 decimal digits. That's what's actually respected by the input at max.

Closes #557
2025-12-22 16:11:13 +01:00
Sophie Herold
a761eb5b2d image/zoom: Zoom >=1 no best fit for ExactVolatile
The best-fit calculation would consider levels >=1 for best-fit. This
seems fundamentally wrong since that should be reserved for LargeFit.

This caused zoom-in to fail since best-fit was considered instead. But
that best-fit was computed with BestFit mode since the mode changed in
between in zoom_to_full.

Fixes #556
2025-12-22 14:14:38 +01:00
Sophie Herold
73c921b042 image/zoom: Improve tracing messages 2025-12-22 14:11:59 +01:00
Sophie Herold
7151cf5d1d image_page: Specific error for file loading
Give a specific error message if loading the source file fails.

Closes #487
2025-12-22 01:40:44 +01:00
Sophie Herold
b9668c7262 image: Unify error handling in one type 2025-12-22 01:40:44 +01:00
Sophie Herold
36ba0edc04 Update copyright comments 2025-12-19 00:06:29 +01:00
Sophie Herold
e9389a3a18 clippy: Fix warnings 2025-12-19 00:04:27 +01:00
Sophie Herold
4d6d771ab4 Use tracing for logging 2025-12-18 23:15:46 +01:00
Sophie Herold
f255af9f6a image/zoom: Keep best-fit zoom in gesture
Don't change the zoom in configure best fit if currently in gesture.
2025-12-10 22:19:37 +01:00
Sophie Herold
83b2c7cae1 util/root: Add window_show_error() to avoid unwrap
Fixes #553
2025-12-09 22:07:30 +01:00
Sophie Herold
cfd33fa2dd util/root: Add window_inspect() to avoid unwraps 2025-12-09 21:55:07 +01:00
Sophie Herold
7b45009eed util/root: Use specific function to show toasts 2025-12-09 15:55:30 +01:00
Sophie Herold
4ec8c8b1cb image_window: Simplify gestures 2025-12-08 16:15:13 +01:00
Sophie Herold
f2dbee5ef8 image_view: Make space for always on scrollbars
Increase the margin of the overlay if scrollbars are set to always
visible.

Fixes #528
2025-12-04 21:33:19 +01:00
Mukul Joshi
48e27739f5 Print preview: Revert to previous width on disabling of fill space
Saves the width prior to applying fill space. This saved width is reapplied when fill space is disabled directly through the toggle.

Fill space may be disabled indirectly (by changing the width/height). In those cases, the saved width is discarded.

Fixes #297
2025-12-04 15:16:16 +01:00
sid
80fb07db03 Add edit function to project summary
Fixes: https://gitlab.gnome.org/GNOME/loupe/-/issues/469
2025-12-04 06:26:57 +01:00
Sophie Herold
4439499cda code: Reformat with Rust 2024 edition 2025-12-04 06:17:55 +01:00
Sophie Herold
2a8a13fd01 cargo: Update deps 2025-12-04 06:17:55 +01:00
Sophie Herold
3b11b0534e metadata: Drop unreliable mime-type
Only use a reliable mime-type. This requires that we load images earlier
in the pipe.

This also fixes warnings about mime types not being available on network
drives like SMB.

Fixes #513
Issue #534
2025-12-03 22:41:24 +01:00
Sophie Herold
246c4a6bcc editing: Correctly detect if trash is supported
Don't activate "Replace Original" action, if trashing of the original
file is not supported.

Closes #509
2025-10-21 22:49:54 +02:00
jakedane
1e6b1688ce image_window: Fix keyboard zoom 300%
Fix the keyboard shortcut for zoom 300% only zooming 200%.
2025-09-23 14:14:52 +02:00
Sophie Herold
0e6ddb0227 Add missing implementations 2025-08-22 15:03:55 +02:00
Sophie Herold
b3d972c5c3 Update to glycin 2.0 alpha.7 2025-07-07 22:18:36 +02:00
Sophie Herold
254e90a14c Add newlines to end of all files 2025-04-18 02:40:39 +02:00
Sophie Herold
ef5f94859b editing: Fix preroateted images
Editing does not work correctly if PNGs or JPEGs are already rotated via
an Exif orientation entry before editing. This needs the glycin-image-rs
1.2.1 loader to work correctly.

Closes #481
2025-04-11 14:48:50 +02:00
Sophie Herold
a49096ffde image/printing: Use cairo renderer for texture
On some systems, to_node -> render_texture generates empty or garbled
textures since GTK 4.18 GNOME/gtk#7464. This does not happen when using the cairo
renderer.

Closes #488
2025-04-10 15:58:16 +02:00
Sophie Herold
5055eddda0 image_window: Don't rely on root existing
This fixes a single case of root being access from the control hide
animation. Apparently it's possible that the widget is unparented from
the window and unmaped but not yet unrefed?

Fixes #473
2025-03-29 19:57:36 +00:00
Zander Brown
de38b92f2f
image_pane: The value of ‘translatable’ should be ‘yes’ 2025-03-24 03:10:18 +00:00
Zander Brown
7f1fdca8a8
edit_window: The value of ‘translatable’ should be ‘yes’ 2025-03-24 03:10:18 +00:00
Zander Brown
ba0dacddd5
error_details: The value of ‘translatable’ should be ‘yes’ 2025-03-24 03:10:14 +00:00
Sophie Herold
8983f61558 edit/crop: Select correct orientation on open
Closes #468
2025-03-05 23:35:07 +01:00
Aleksandr Melman
878b88cbb1 Edit image_view.ui 2025-03-05 18:21:44 +00:00
Aleksandr Melman
ededb183ab Edit crop.ui 2025-03-05 18:15:30 +00:00
Sophie Herold
11551456e9 NEWS: Add missing entries 2025-02-27 22:16:44 +01:00
Sophie Herold
c9e5c9ed42 edit/crop: Orient aspect ratio icons
Orient the icons for aspect ratio selection based on the selected
orientation.
2025-02-27 12:49:22 +00:00
Sophie Herold
281080a21f edit/crop: Fix edge resize for fixed aspect ratio
Allow to decrease the size when dragging an edge with fixed aspect
ratio.

Issue #409
2025-02-26 14:48:39 +01:00
Sophie Herold
6920fda2be edit/crop: Rename a document some code 2025-02-26 14:42:52 +01:00
Sophie Herold
341aef672e image: Use convention that rotations is always CCW 2025-02-24 14:08:56 +00:00
Sophie Herold
1d40a28b54 editing: Decide editable based on true mime type
Previously it was decided on the early unreliable mime type.

Fixes #449
2025-02-19 11:51:18 +01:00