This was a beast of a bug since e’s fsel widget didn’t work at all with the typebuf mechanism from the file manager widget and the typebuf itself was barely functional. The first step was, obviously, to get the fsel to take focus when called up. Easier said than done: widget focus in E17 is something like a magic 8 ball.
After some related debugging and hacks, I got it working — the typebuf actually showed up and fsel didn’t try to focus all the stupid labels and disabled entry widgets from the preview pane. Next, I investigated the typebuf code. Basically all that was handled here was selecting files in the current directory based on what was typed. A good enough start, but far from the end result.
The biggest hurdle here was how the efm widget handles “devices”; when the path to the widget is set, you pass a “device” string which isn’t actually a device but an identifier for efm which tells it what the root directory should be for the widget. So any time you start typing, the typebuf needs to determine where you are, and then what relation the path you’ve typed has to this directory. And, of course, if you start typing on the desktop, you definitely don’t want your desktop to start listing through all the directories.
After some fiddling, I had it all working; efm widgets changed directory according to the typebuf’s contents and it would gracefully handle switching between “/” and “~/”. On to tab completion! This was another part of efm which was not really implemented. It would do the selection when you pressed tab, but nothing else would happen; it wouldn’t update the typebuf or actually give back the selected icon to the completion function for further use.
Anyway, eventually it all became usable, and so I linked the efm typebuf to the fsel entry widget so the path would stay after the typebuf vanished. Some more focus hacks later, and the ticket was closed. We now have fully functional autocompletion in efm and related widgets: simply start typing a path and away you go!
I didn’t bother to see what actually happened, but it seems that when trying to save a screenshot with an extension other than “.jpg” or “.png” we would just throw an error dialog and then delete the screenshot. Not ideal. Now we just throw the error dialog.
I’ve never seen this progress thingy actually show up, but I guess we were always displaying the time in seconds, even when it was a really long operation. I considered adding more flavorful text, but I’m feeling especially boring today so I didn’t.