Commit Graph

67 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 8da5f807cf
Move and extend the browser toolbar
This makes the user interface more cohesive, and easier to use.

Both toolbars should ideally be made configurable.
2023-04-11 06:33:22 +02:00
Přemysl Eric Janouch 1b50a834a5
Add optional browser filename labels 2023-04-11 06:04:27 +02:00
Přemysl Eric Janouch c646864805
Add directory tree traversal functionality
Thus far merely bound to the [ and ] keys in the browser.
2023-04-05 00:09:53 +02:00
Přemysl Eric Janouch 796b05c9a5
Integrate online reverse image search
This makes use of our image processing capabilities in order to
turn arbitrary image files into normalized thumbnails,
upload them to a temporary host, and pass the resulting URI
to a search provider.

In future, fiv should ideally run the upload itself,
so that its status and any errors are obvious to the user,
as well as to get rid of the script's dependency on jq.
2023-03-15 05:52:32 +01:00
Přemysl Eric Janouch dd09af34b7
Make binaries say what git commit they come from
The manual skipping of the initial "v" from tag names is unfortunate,
but still a bit better than further cluttering up the build system.
2022-08-13 12:42:21 +02:00
Přemysl Eric Janouch 1a163bdb8b
Resolve a few issues with MSYS2 cross-builds
- Fix launching of subprocesses (missing gspawn helpers).
 - Discard unused GSettings schemas.
 - Make the program find its user guide.
 - Bundle a somewhat suboptimal version of ExifTool.
2022-08-11 16:10:04 +02:00
Přemysl Eric Janouch dba2b9c982
Fix the argument list of a callback 2022-08-10 10:22:44 +02:00
Přemysl Eric Janouch b6e1dc4893
Overload the F9 keyboard shortcut
It doesn't make a lot of sense to be able to toggle invisible widgets,
so just make F9 toggle "the toolbar that can currently be seen".

The more permanent setting can be adjusted in GSettings.
2022-08-09 18:03:55 +02:00
Přemysl Eric Janouch 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
Přemysl Eric Janouch 4927c8c692
Don't crash on orphan URIs 2022-08-08 15:14:20 +02:00
Přemysl Eric Janouch 33fb047a73
Make Alt+Return work in the browser as well 2022-08-06 07:49:01 +02:00
Přemysl Eric Janouch 8c6fe0ad32
Integrate dconf-editor
This is a more than adequate solution for now.
2022-08-05 09:58:04 +02:00
Přemysl Eric Janouch 51dc56c9df
Improve support for opening HTTP URIs
While all GVfs files implement the mountable interface,
mounting may not actually achieve anything.
2022-08-05 04:15:42 +02:00
Přemysl Eric Janouch d590d1da46
Add support for copying to clipboard 2022-08-04 00:35:22 +02:00
Přemysl Eric Janouch d1d9caaa5e
Capitalize modifier names, prefer Command on macOS
So far, the macOS special casing is only partial.

Also, GtkShortcutsWindow confusingly labels Command as Meta.
2022-08-04 00:34:05 +02:00
Přemysl Eric Janouch 6baf1a7bbd
Make the switch-to-browser button select last file
Before, it was only possible to achieve the same result using keyboard.
2022-07-26 00:31:43 +02:00
Přemysl Eric Janouch 78636fdc18
Add sidebar/toolbar toggles to GSettings 2022-07-25 23:20:30 +02:00
Přemysl Eric Janouch e18f729488
Add thumbnail size to GSettings 2022-07-25 21:09:15 +02:00
Přemysl Eric Janouch 9f1041988d
Add a dark theme toggle to GSettings 2022-07-25 20:27:36 +02:00
Přemysl Eric Janouch 31f428f4ec
Make the window assume a centred position on macOS
Windows and Linux applications are more likely to not bother,
and their desktop environments don't place windows right in the corner,
which is what happens with GTK+/macOS.
2022-07-23 21:26:24 +02:00
Přemysl Eric Janouch 5529727137
Fix thumbnail passing on Windows
LF was converted to CR LF, systematically corrupting bitmap data.
2022-07-22 20:49:54 +02:00
Přemysl Eric Janouch e137afa736
Fix a function name conflict on Mingw-w64
This could also be resolved through `#define NO_OLDNAMES`,
however the function rather deserved a more precise name.
2022-07-22 18:33:55 +02:00
Přemysl Eric Janouch 891420edfd
Handle back/forward mouse buttons on Win32/macOS
There is no conflict with X11/Wayland, because 4/5 are the scroll wheel,
which never gets forwarded to button-press-event.
2022-07-22 16:27:43 +02:00
Přemysl Eric Janouch e03bc36f63
Print errors from launching new instances 2022-07-21 16:27:48 +02:00
Přemysl Eric Janouch 26dead7ea4
Fix the About dialog animation on macOS 2022-07-17 16:05:08 +02:00
Přemysl Eric Janouch 94f6938b9a
Add a key binding for keeping the zoom/position 2022-07-17 15:26:20 +02:00
Přemysl Eric Janouch bd2e929b77
Add ability to keep zoom/position when browsing 2022-07-17 13:04:29 +02:00
Přemysl Eric Janouch 4efda5347c
Let FivView take care of its drag gesture
Making the GtkScrolledWindow's scrollbars draggable again.
2022-07-17 07:16:41 +02:00
Přemysl Eric Janouch ca57c2632a
Simplify view dragging code a bit 2022-07-16 14:57:44 +02:00
Přemysl Eric Janouch c55500f51a
Support dragging the view
It would also be possible to handle this through press/motion/release
event handlers, though GtkGestureDrag is more convenient for hacking in
support for dragging to widgets not supporting GtkScrollable (yet).

There may be some undesired interactions lurking, besides the jarring
movements when dragging native GdkWindows (these are a pain).
2022-07-15 14:00:31 +02:00
Přemysl Eric Janouch 84f8c9436f
Downscale embedded thumbnails within minions
Otherwise the UI would become unresponsive during loading.
2022-06-08 02:51:55 +02:00
Přemysl Eric Janouch 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
Přemysl Eric Janouch 4ca8825e02
Clean up
Use gchar when memory is allocated through GLib.
2022-06-05 13:30:53 +02:00
Přemysl Eric Janouch 3ddb0cf205
Expose the mtime of the model's entries 2022-06-04 14:50:56 +02:00
Přemysl Eric Janouch b6315482b7
Fix sort changes taking way too much time
All thumbnails were reloaded five times on each change.

GTK+/GObject's behaviour doesn't make a lot of sense, but such is life.
2022-06-02 11:46:16 +02:00
Přemysl Eric Janouch 04ec292caf
Make thumbnailers pass back raw images 2022-02-20 21:14:33 +01:00
Přemysl Eric Janouch a28fbf25bc
Implement wide thumbnail cache invalidation 2022-02-20 15:44:42 +01:00
Přemysl Eric Janouch 5d019e20b5
Make the view a drop target 2022-02-17 10:57:05 +01:00
Přemysl Eric Janouch ee5f63e50b
Adjust keyboard shortcuts 2022-01-26 04:44:00 +01:00
Přemysl Eric Janouch 6e26dc13b4
Only show the info bar when appropriate
The late, global gtk_widget_show_all() made it always start visible,
in particular when the program was launched directly on an image file,
and not in browsing mode.
2022-01-25 06:15:05 +01:00
Přemysl Eric Janouch ee71fb0dd0
Start a basic user guide
Move some information out there from the README.
2022-01-25 05:54:00 +01:00
Přemysl Eric Janouch 991e74b99b
Redirect image open failure messages
Pop-up dialogs are quite annoying, as is not being able to
iterate over broken images.

This will also be useful for warnings and asynchronous loading.
2022-01-24 02:48:38 +01:00
Přemysl Eric Janouch 38670428da
Add keyboard shortcuts for thumbnail size 2022-01-23 06:44:50 +01:00
Přemysl Eric Janouch 8a656121a3
Update command line usage string 2022-01-16 01:51:04 +01:00
Přemysl Eric Janouch 13ae4810ca
Apply some bits of GNOME HIG 1.0 2022-01-13 21:38:32 +01:00
Přemysl Eric Janouch 8e8cf49343
Add a normally hidden, stubbed-out menu bar
So that the About dialog is discoverable now at all.
2022-01-13 21:08:59 +01:00
Přemysl Eric Janouch 6de5ab6298
Select the file when Return-ing from the viewer
It might make sense to also do it on M-Left or the back button.
Not sure about it so far.
2022-01-12 11:15:35 +01:00
Přemysl Eric Janouch 757bc9beaa
Fully support GNOME's inode/directory mechanism 2022-01-12 11:12:32 +01:00
Přemysl Eric Janouch f632510d2a
Put reloading the image as its own action 2022-01-12 10:58:33 +01:00
Přemysl Eric Janouch cfa90fb7de
Don't hardcode the project name in its URI 2022-01-12 10:41:33 +01:00