Select a directory with KFileWidget?
David Faure
faure at kde.org
Tue Jan 13 19:29:31 GMT 2009
On Saturday 10 January 2009, Andreas Pakulat wrote:
> Done that, though I didn't dig too deep into the codebase. One thing that
> annoys me about KFileWidget is that its not really been written with
> embedding it "anywhere" in mind, its clearly geared towards embedding into
> a KDialog as a filedialog. Not even easily usable in a wizard dialog.
Well, I splitted it out of KFileDialog -with- that use case in mind (being able
to embed it as a widget anywhere else), but of course there was no time to
actually test that. Looks like you're simply missing signals? That should be
easy to add, no?
> Anyway, my "solution" for KDE4.2 code is simply finding the KDirOperator
> and connecting its urlEntered signal, as well as using the locationEdit's
> editTextChanged signal. This way I get notified about any of the changes
> in the dialog wrt. switching to a different directory or selecting some
> file. Which allows me to update my wizard state apropriately.
>
> For 4.3 it would be nice if we could expose the KDirOperator via a new
> non-virtual access or KFileWidget.
OK.
> (As far as I understood
> KAbstractFileWidget exists only so kio doesn't need to link against kfile,
> as that would produce a circular dependency).
Well more precisely, libkfile was splitted out of libkio so that KFileDialog dlopens
the libkfile code rather than linking to it; the initial issue wasn't of circular
dependency (it was all in kio), but of making kio thinner (e.g. for faster startup times),
loading the file-dialog code "on demand".
> The attached patch does that,
> Rafael, David what do you think?
Seems fine to me, just add @since 4.3 and commit.
--
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list