Add support for papers-previewer
I would like to implement something similar to xdg-desktop-portal-gnome!216 in gtk3/gtk4, but a "fallback" mechanism seems to be more complicated here, because the print-preview program is set through the gtk-print-preview-command
setting.
Why can't we override the gtk-print-preview-command
setting downstream to use papers, you may ask?
Because shipping this configuration in /usr/share/gtk-3.0/settings.ini
applies globally, while different spins/flavours of the same distro may want to use different defaults, and as far as I know there's no place to drop a settings.ini
file in a conf.d
-like directory for different spins/flavours to write their own setting.
I had this idea of converting the gtk-print-preview-command
setting from a string to a colon-separated list of strings, in a backwards compatible way, which gtk will iterate through and try all commands until one exists (but this would include other hacky things such as extracting the binary from the command string with something like sscanf(cmd, "%s ", &binary)
to get the path or filename of the binary in order to check whether the binary exists or not).
WDYT? Got better ideas?