If I want to open or save a file in an gtk3 app (eg firefox) I get an unwanted search function after tiping a character.

Old and productive behaviour: typing d gives me the first file beginning with d, typing de gives me the first file with de.

New and unwanted behaviour: typing d starts a search process and gives me /home/myuser/Downloads/somestuff/DETLEFF or some other file somewhere in the system.

Example: Gtk3FileChooser

How can I change back to the old and productive behaviour?

My system: archliux64, Gtk3: 3.18.6, windowmanager: fluxbox

up vote 15 down vote

The feature you are looking for is called "typeahead" and it is disabled in GtkFileChooserDialog. gtk3-typeahead from the AUR restores the previous behavior.

The package author says disabling typeahead is hardcoded in GTK+ and in a bug report it was stated: "It's not a bug; the removal of the type-ahead search was very much intentional."

Note there is now some (partially broken) tab-completion in the name/address field mimicking the behavior of the shell.

It's been a year and this still annoys me, since the GTK3 folks decided to hardcode this behaviour in, with no way to revert it without recompiling.

However, typeahead was patched back in to gtk3 as distributed in Ubuntu.

Ubuntu also made the file chooser require a doubleclick to choose a file, instead of only requiring a single click if the file was already selected. If you are OK with patching the gtk3 source code, I have made a patch which works as of gtk+ 3.22.7 combining the ubuntu patches and updating them to a more current version of GTK.

Additionally, I made a script for my debian system which automatically downloads the source for the latest version in the package manager, patches it, and compiles it. Runs correctly on Debian Sid, and should work fine for other Debian distros, too.

On Debian unstable, you can get the typeahead functionality by pressing ctrl-l when the window is open (l for lookahead), but only for file open dialogues, not file save dialogues. For file save dialogues, ctrl-l will only highlight the name of the file to be saved. To navigate in a more intelligent way, you can type ~, /,. in the correct combinations to get your home directory, current directory, or a directory path from root. Also hitting the back arrow key can deselect the name and keep the cursor in the box so you don't loose the current name (as would occur in a "Save As" operation).

It seems to be that the old behavior was much better :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.