by superkuh · 4y ago · 0 comments
As of right now if you File->Open in any program using modern Gtk3 and try to paste a file path in you'll get an error instead of pasting your filepath in a text field to open, "The folder contents could not be displayed\nOperation not supported" http://erewhon.superkuh.com/gtkfilechooserwidget-paste-fail....
It's unfixable behavior because the GNOME devs stopped respecting their own gsettings, org.gtk.Settings.FileChooser location-mode, to FORCE the path-bar experience on everyone. Because no one needs to type file paths, apparently. So why bother respecting the settings for path-bar or filename-entry? Their demographic doesn't care. Unfortunately gtk3 is used by far more than GNOME's demographic.
They have fixed this bug in gtk4, for all the good that does.
That's happening! Gtk 3 and 4 include GtkFileChooserNative[1]. It works like a file dialog except the application doesn't know about its widgets. That means it can proxy another application.
So if you're running a Gtk app in a sandbox like Flatpak or Snap, Gtk will use the Xdg file chooser portal[2]. In GNOME, this is implemented by an application (in the host) which, itself, creates a GtkFileChooser. In the future, it could be a beefier application. One benefit of that taking a while to happen is, once the implementation gets fancier, there won't be too many weird mismatched applications.
(Also, I mention GNOME, but it's important to notice the file chooser portal is itself platform neutral; KDE apps use this, too, and the implementation depends on what desktop you are running. Yay, decoupling!).
Not everything uses GtkFileChooserNative, but pretty much any recent Gtk app that doesn't have weird requirements probably does. Off the top of my head, Firefox, Secrets, Bottles, GNOME Builder and GNOME Text Editor (although they still ask for access to all of the of the files for other reasons), … even Slack and VS Code! (Electron switched over recently).
[1] https://docs.gtk.org/gtk4/class.FileChooserNative.html
[2] https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.free...
That bundling file chooser with a GUI framework is a bad idea should be obvious since well, ... Java Swing?.
And a easy to use system interface for a file chooser isn't hard to make, could have been (preferable) a binary you call and communicate with pipes with or similar or could have been something else (e.g. shared object).
It's kinda sad that the various Linux communities where so focused on their GUI framework being the best that it didn't happen until it was technically needed (for sandboxing) ...
EDIT just to be clear 95+% of applications could use a cmd with Linux style arguments which once done emits the selected file(s) to stdout, but there are a minority of advanced use-cases which require a bit of two way communication. Through most of them are bad ideas anyway, so maybe that could have been ignored.
A lot of this stuff was "decided" back when we had serious memory constraints, and less technology to manage them. Switching processes was costly. Running the file chooser in the same application was an excellent compromise. A solution. (I remember an article about this problem in the context of early MacOS, along with drag & drop and the like. Will share if I find it).
In addition, having the file chooser in-process makes sense if you're trying to appease app developers, who think they want the ability to change everything. In particular, they'd really like to add a custom preview widget and some other gizmos to the file chooser. Photoshop puts all sorts of buttons in its Export dialog, for instance. And because Photoshop does it, a bunch of other applications think they should, too. And they still want to, even if they're using Gtk.
Saying "this is dumb, we need this dialog to be a simpler interface for [reasons] and if your app has a weird file dialog you'll have to deal with it" is a very decisive action, and it is not without friction. So I think the reason this took so long is partly an accident of history (the bad solution stuck because it was too late by the time we could afford the good solution), and partly just luck: things reached an inflection point where app developers actually get something (sandboxing and clever app containers) in exchange for the inconvenience.
Why though? Am I the only one that hates modal windows? Why does the parent window have to be blocked by the dialog window? Can't it be like the color picker dialog in GIMP?
It turns out, that when that happens, the user can accidentally focus the main window while the file picker is up, and then the file picker gets hidden underneath it. As a fun bonus, the application now _probably_ appears to be frozen/crashed because it's waiting for input from the file picker that the user can no longer see.
It's just a bad idea, man. For most people anyway.
Wayland might be more difficult since it likes to isolate processes more but considering this should have been common before Wayland was designed it could and should have influenced that design.
Edit: And I think Wayland would make this impossible? Someone correct me if I'm wrong here, but don't you lose basically all inter-window introspection with it? There may be some negotiation process, but I don't know how you would go about accessing an entirely separate application's context under that pipeline.
I really wish we had another popular GUI toolkit that isn't Qt.
I'd much rather have one single toolkit standard so that everything can look and behave the same TBH.
Control + L will turn the path bar into a simple string w/ autocomplete. Am I missing something here or are you talking about pasting a path into the filename portion of the dialog?
i only need a terminal, emacs, browser, thunderbird, the occasional screenshot and it was still horrific.
to be clear it was only the usability that was a nightmare. i experienced no bugs. it's solid. but wow it is unusable.
please, please, please someone at gnome headquarters ... can you make it usable? look at win10, win11, macos, kde, chromeos they all work fine. can't you do something like that? i believe you have the best software stack out there, and you're throwing it away with that frightful design.
this is tragic.
I know lots of people don't like Macs because they're not super tweakable, and that's fine. It's still my impression that Gnome is aiming for that target, while not quite understanding why a lot of people do like Macs.
and you're right. macos is fine from a usability point of view. everything in gnome UI feels like they started strong, stayed strong, and then gave up half way ... (so many examples there's no point listing them anymore) and yeah put the clock in the middle of the bar while we're at it too.
and yet, you feel the potential no? no bugs whatsoever for me.
:/
back to xfce4. clunky, but consistent. some bugs. it's ok.
I simply do not understand people.
The only thing that makes GNOME bearable for me are a handful of extensions and post-install tweaks. Specifically Dash-to-Panel and ArcMenu.
The biggest thing that still annoys me is the GNOME folks have this fetish about stuffing as many widgets as they can into the titlebars of windows.
For very basic desktop usage, GNOME 3 does about 65% of what I need. Because it's Linux, I can have TTYs that run KDE, i3, or more customized shells that accomplish the rest.
Not doing this would be an exercise in learned helplessness, which is exactly what I chose Linux to get away from.
1. spin up a new file picker: GTKFilePicker.c
2. add a deprecation warning to gtkfilechooserwidget.c
3. wait 20 years, then git rm gtkfilechooserwidget.c
I wonder, why can't they introduce something like gtkfilechooserwidget2.c leaving the original widget intact?
When someone posted this as a bug because of the obvious unintended idiocies with this a being a default immutable behavior, the maintainer essentially told him to f off and go build his own version.
https://bugzilla.redhat.com/show_bug.cgi?id=1644986
Made another MacOS covert with that exchange, I'm sure.
GTK is a GUI toolkit. It is literally made for building GUI applications. The Gnome developers are building a graphical DE. Your reasoning doesn't seem to sensible to me.
If those developers have a perfectly good work around, then there is no pain point for them. It doesn’t matter if it is a pain point for their GUI-exclusive users. If they don’t feel the pain, it won’t be prioritized.[*]
This isn’t a criticism of Gnome per se, but rather a reality of time management. There is only so much time to go around, which means features and bugs get triaged. If none of the developers feel like this is enough of a pain to get into the quagmire that is the GtkFileChooser (?) widget, then it will not be touched.
[*] That is, of course unless they are being paid to do the work. If you are volunteering, then you get to choose what work to do. If you’re getting paid, the suddenly not working on the file chooser could become a pain point for the developer (as they might not get paid). Which is the major advantage commercial OSes have over their open source competition.
I am joking but I think they considered removing tabs because you should use multiple windows and ENJOY the cool Window manager their designed to switch between windows.
sigh
it could be so awesome if a non-schizo designer got involved. it's frustrating really. so much potential, such thick window bars.
it is so stupid.
Then the great childish "let's rewrite everything from scratch" for both Linux DEs happened. It was a decade? before KDE was remotely viable again.
The gnome/gtk Devs focusing on zero configuration options possibly the most rubbish redesign I've ever seen.
KDE/Plasma only became viable to me in the last 24 months. Felt like a POC