Wednesday, June 9, 2004

KDE File Picker

Currently I work on KDE file dialog for OOo. Generally it means to implement FilePicker service; the problem is how to do it :)

Once KDE vclplug is finished, it will be simple, I believe. But I need a solution for 1.1.x, so I tried to link FilePicker to Qt; I do it in KDE NWF anyway. It was not a good idea, a deadlock appeared as soon as the dialog showed, and to solve it would be too intrusive. Then I hoped I could collect all the data, execute kdialog binary (part of KDE) with all the settings and return all the values when it finishes. But "Version:" list box did not work, it needs to be notified when a file is selected. So I ended up implementing an external binary providing the file dialog that can notify about every user's action.

The result is a kdefilepicker binary. It is a "filter" which gets commands from stdin, and sends output to stdout according to the user's actions. The implementation of the FilePicker service on the OOo side executes the binary and then just sends and receives commands. So it will be easy to extend it for Gnome when someone writes the Gnome "filter".

Of course this is a temporary solution just for 1.1.x, and I will not try to upstream it. But I'll make it public through ooo-build for testing soon.

No comments:

Post a Comment