KDE File Chooser in GTK apps on Kubuntu
Derek Broughton
news at pointerstop.ca
Tue Oct 21 18:06:51 UTC 2008
Art Alexion wrote:
> On Tuesday 21 October 2008 11:17:47 am Gordon Schulz wrote:
>> Unless there is some
>> freedesktop.org standardization or well defined APIs by both KDE/QT and
>> GNOME/GTK (which is pretty unlikely for something as internal as file
>> selectors) anything that does what the OP linked to is pretty much a
>> quite crude hack in my book. Quite likely to break from version to
>> version etc.
>
> I couldn't write a line of code to save my life, but I have a reasonable
> understanding of how it works.
>
> The gtk APIs/calls to the file open dialog have to be standard among
> current
> gtk+ apps. Otherwise gtk+ programs couldn't share them.
>
> Likewise the qt APIs have to be standard so that current versions of KDE
> programs can access them.
>
> What needs to be developed is a translation layer that translates calls
> from the gtk app to the gtk file open dialog to be redirected to a call to
> the
> corresponding action on a qt file open dialog. In turn, it would
> translate the dialog response to the gtk app.
It should be (and I assume it's what kGtk does, but I haven't looked yet) be
as simple as providing a kde library that contains functions of the same
name as the gtk library functions. The trick is to make them get called
before the gtk functions _only_ when your desktop is KDE (no doubt
_someone_ would find another use case, but geeks can take it from
there...).
>
> So, say a single translation layer should work for all calls from gtk 2
> apps to kde 3.5.x apps, though a separate layer might be needed for gtk 1
> apps (if there are still any) or kde 4 apps.
--
derek
More information about the kubuntu-users
mailing list