Native mode for KFileDialog API on Windows (again)
Olivier Goffart
ogoffart at kde.org
Mon Jun 9 17:18:12 BST 2008
Le lundi 9 juin 2008, Jaroslaw Staniek a écrit :
> Hi,
> I am looking (again) for the finest way to wrap native file dialogs support
> for Windows in KFileDialog API.
> In a such QFileDialog mapping, getOpenFileName() would be mapped to
> QFileDialog::getOpenFileName(), etc.
>
> The goal would be that both KDE and Native mode would be available in the
> same KDE installation, easily switchable in a "Integration" page of the
> system settings.
>
> KFileDialog inheriths KDialog, so we would still keep its instance
> allocated even if it's not displayed, and we could display native dialogs
> instead.
>
> Notes:
> - we want to avoid any changes in the applications code, so no #ifdefs;
> devs that do not even think about windows/mac builds of their could
> would not be disturbed by any requirement
>
> - we agree on that functionality of the native mode is degraded, e.g. no
> KIO support, and only native mimetypes/associations support
>
> - in KDE 3 I've been using such mappings implemented as application's
> level, e.g. in Kexi, but now we have hundreds of apps and want fine level
> of consistency.
>
> - perhaps Mac OS X port would benefit from the native mode too
>
>
> Any hints? Notes?
>
>
> PS: This is a technical question, not a request for comments on what mode
> to use. Given developers using kdelibs would just #ifdef things in their
> code if there is no support for the native mode in kdelibs.
You could catch the show event of the KFileDialog to hide the dialog, and show
the ugly and featureless native one instead. And map all to small amount of
available feature.
I don't know how it will work for application that make advanced use of the
dialog...
Maybe that could be optionel at runtime (a config setting). I think it would
be great to give the KFileDialog anyway. (Some prefer features over
consistency)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080609/bd6bb69f/attachment.sig>
More information about the kde-core-devel
mailing list