Commit Graph

67 Commits

Author SHA1 Message Date
28a1237d62
Slightly optimize file monitoring event handling 2023-06-01 20:58:16 +02:00
4c8df56193
Distinguish removed files more prettily
It's still somewhat bad, but at least no longer ridiculous.
2023-06-01 19:11:20 +02:00
200485246b
Process some GFileMonitor events
So far, it's rather crude.
2023-05-31 18:39:14 +02:00
2caebb7d19
Fix crash when right-clicking removed files 2023-05-31 14:46:06 +02:00
a012011631
Deduplicate file information structures 2023-04-14 07:31:03 +02:00
05ac3a0651
Check filesize when retrieving thumbnails
In particular, this handles screenshots from Rigol oscilloscopes,
which reuse the same name series with the same file modification time.
2023-04-14 05:24:57 +02:00
4317c7e581
Remove a comment
Upon closer thought, I don't know how to implement the idea reasonably.
2023-04-14 05:24:57 +02:00
1b50a834a5
Add optional browser filename labels 2023-04-11 06:04:27 +02:00
69d45fea44
Use a GQueue for thumbnailing
It's mildly less awkward to use, and fixes one complexity issue.
2022-08-09 16:22:27 +02:00
4e11970a7e
Do produce thumbnails of thumbnails, but in memory 2022-08-09 13:22:11 +02:00
ae0b5506ab
Remove a stale comment 2022-08-09 08:31:51 +02:00
701846ab39
Support opening collections of files
Implement a process-local VFS to enable grouping together arbitrary
URIs passed via program arguments, DnD, or the file open dialog.

This VFS contains FivCollectionFile objects, which act as "simple"
proxies over arbitrary GFiles.  Their true URIs may be retrieved
through the "standard::target-uri" attribute, in a similar way to
GVfs's "recent" and "trash" backends.

(The main reason we proxy rather than just hackishly return foreign
GFiles from the VFS is that loading them would switch the current
directory, and break iteration as a result.

We could also keep the collection outside of GVfs, but that would
result in considerable special-casing, and the author wouldn't gain
intimate knowledge of GIO.)

There is no perceived need to keep old collections when opening
new ones, so we simply change and reload the contents when needed.

Similarly, there is no intention to make the VFS writeable.

The process-locality of this and other URI schemes has proven to be
rather annoying when passing files to other applications,
however most of the resulting complexity appears to be essential
rather than accidental.

Note that the GTK+ file chooser widget is retarded, and doesn't
recognize URIs that lack the authority part in the location bar.
2022-08-08 18:06:50 +02:00
33fb047a73
Make Alt+Return work in the browser as well 2022-08-06 07:49:01 +02:00
5bae7c1bd2
Use gdk_event_triggers_context_menu() 2022-08-03 21:37:45 +02:00
ab70b30053
Centre ultra-wide items vertically
Overall, this looks better, even though we lose a baseline of sorts.
2022-07-31 04:35:04 +02:00
eca319e5e4
Extend a comment 2022-07-24 22:46:03 +02:00
4b4e24e71a
Work around broken Cairo Quartz backend on macOS
Pre-render the padded pattern, costing us 2 megabytes of memory there.
2022-07-23 20:47:57 +02:00
d3b34cd482
Only offer horizontal browser scrolling if useful
Motivated by small screens.
2022-07-21 16:04:51 +02:00
b067c1948b
Use GDK event handling return value constants 2022-07-21 16:03:36 +02:00
390e21a72d
Fix touch screen drag scrolling in the browser 2022-07-21 15:33:42 +02:00
876fda4f55
Handle the long press gesture on browser items
Unfortunately, this doesn't work on X11, though Wayland seems fine.
2022-07-21 12:28:01 +02:00
62b1e83541
Support horizontal scrolling in the browser
An unlikely situation.
2022-07-17 13:47:56 +02:00
23429d9631
Implement GtkScrollable in FivView
This fixes rendering and positioning behaviour when dragging on X11,
where we aim to use a native GdkWindow.
2022-07-17 05:27:06 +02:00
1fee920902
Make the browser scroll with touchpad on Wayland
And generally clear up scroll handling.
2022-07-15 07:35:33 +02:00
a1b2225750
Move the browser's popup menu to its own file 2022-07-04 20:44:47 +02:00
a8f7532abd
Employ embedded thumbnail extraction
And store all direct thumbnailer output in the browser's cache--
low-quality thumbnails will always be regenerated, as is desired,
and we'll reload faster on devices where we don't store thumbnails.

This change improves latency at the cost of overall efficiency,
seeing as images with thumbnails will be spent cycles on twice.

Keeping this out-of-process avoids undesired lock-ups.
Moreover, embedded thumbnails can be fairly expensive to decode.
2022-06-08 02:51:54 +02:00
8dfbd0dee2
Add a command line option to extract thumbnails
Only use LibRaw for now, which probably has the most impact
using the least amount of effort.
2022-06-08 02:51:54 +02:00
4ca8825e02
Clean up
Use gchar when memory is allocated through GLib.
2022-06-05 13:30:53 +02:00
8bba456b14
Cache thumbnails across reloads
This will speed up sort changes, as well as simple reloads,
at the cost of an extra hash map from URIs to Cairo surface references.

It seems unnecessary to provide an explicit option to flush this cache,
as it may be cleared by changing either the directory or the current
thumbnail size.
2022-06-04 16:37:25 +02:00
bb97445a96
Attach mtime to the browser's rescaled thumbnails 2022-06-04 16:37:25 +02:00
e2adac72cc
Use the model's mtime for validating thumbnails
Saves a syscall, generalizes fiv_thumbnail_lookup(),
wastes a tiny bit of memory per entry.
2022-06-04 16:37:25 +02:00
3ddb0cf205
Expose the mtime of the model's entries 2022-06-04 14:50:56 +02:00
da507edd05
Prevent thumbnailing from disrupting mouse clicks 2022-02-24 21:52:25 +01:00
580b68789b
Turn the browser into a DnD source
The destination does all the work of handling file operations.

Also, add some missing logic for horizontal scrolling.
2022-02-22 15:44:38 +01:00
31f9feab7b
Use the X-GNOME-FullName desktop file key 2022-02-21 22:29:14 +01:00
41bd25e711
Avoid g_app_info_should_show() in context menus
We were hiding our own JPEG cropper.
2022-02-21 21:49:44 +01:00
68bb695054
Clean up 2022-02-20 21:29:34 +01:00
04ec292caf
Make thumbnailers pass back raw images 2022-02-20 21:14:33 +01:00
fbf26a7d66
Show application icons in context menu items 2022-02-20 12:07:40 +01:00
ef2544868d
Open items on mouse button release, not press
At least the left and middle mouse buttons seem to behave similarly
in other programs and systems.

Context menus are opened on button release on Windows and with some
GTK+ widgets (popovers in GtkPlacesSidebar).
2022-02-14 02:10:25 +01:00
0857a04a3a
Scroll to selection when returning from the viewer 2022-02-13 13:18:36 +01:00
4302ec71f2
Make changing the browser zoom launch thumbnailers 2022-02-13 13:18:36 +01:00
38670428da
Add keyboard shortcuts for thumbnail size 2022-01-23 06:44:50 +01:00
757bc9beaa
Fully support GNOME's inode/directory mechanism 2022-01-12 11:12:32 +01:00
05453718bb
Avoid blank browser space when resizing the window 2022-01-12 10:41:33 +01:00
f1e9e47e13
Implement browser keyboard navigation 2022-01-11 14:36:19 +01:00
764312652d
Support invoking a context menu from keyboard 2022-01-11 12:26:28 +01:00
e663f02754
Implement selection in the browser
Keyboard controls are missing so far.
2022-01-11 11:27:35 +01:00
1a190001fc
Make the browser implement its own scrollable
It's quite rough around the edges so far.
2022-01-10 11:53:15 +01:00
4f19a67da3
Add an unnecessarily fancy about dialog 2022-01-09 19:11:36 +01:00