Saturday, October 26, 2019

GTK3 "Typeahead"

A large subfraction of the community (including me) seems to think the GTK3 Open/Save dialog has got worse than useless behavior when you type a few letters.  What I expect, being generally used to Linux and the "old ways", is that typing "py" selects the first entry in the current directory which starts with these letters.  (GTK3 people call that "typeahead"; traditionally it's called auto-completion.)  What we get instead is *all* the files in *all* subdirectories which *contain* what you typed.  If you type "py" and expect to select the directory called "python", then hah---good luck.

The point of this post is that today, by chance, I found a quick workaround I thought I'd share.

If you type "." or "/" as the first letter, then the dialog box goes in a different mode in which it does behave as expected!

So you can type "./py", for example.  Or, this different mode being sticky, you can also type "." followed by backspace followed by "py".

Good to know if you're only occasionally finding yourself comfronted with a GTK3 open/save dialog, and think it's not worth investing hours recompiling GTK3 with custom patches you find left and right on the net.  (There are quite many such patches, and lots of complains too.)

No comments: