Reply to topic

Force KDE Apps to use the Native Mac OS X file chooser

ngativ
Registered Member
Posts
66
Karma
0
OS
Instead of the KDE file chooser... is that possible?

Last edited by ngativ on Wed Dec 07, 2011 1:49 am, edited 1 time in total.
ngativ
Registered Member
Posts
66
Karma
0
OS
Ok i have these settings on my kdeglobals file:

Image
Code: Select all
[KFileDialog Settings]
Native=true

But as you can see, the file dialog chooser is corrupted. How can i use the native qt file chooser that at the same time uses the native Mac OS X file chooser?
ngativ
Registered Member
Posts
66
Karma
0
OS
Kind of Solved...
I had to mess up with some kdelibs4 libraries

Image
User avatar dpalacio
Registered Member
Posts
240
Karma
2
OS
> I had to mess up with some kdelibs4 libraries
Please expand on this. Not for me, but for people from the future that have the same problem.


connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
ngativ
Registered Member
Posts
66
Karma
0
OS
dpalacio wrote:> I had to mess up with some kdelibs4 libraries
Please expand on this. Not for me, but for people from the future that have the same problem.


Sure!. I just added mac os x support for the native dialog definition in these files..

differences:

kdelibs-4.7.3/kio/kfile/kfiledialog.h
Code: Select all

752c752
< #if (defined Q_WS_WIN || defined Q_WS_MAC )
---
> #ifdef Q_WS_WIN


kdelibs-4.7.3/kio/kfile/kfiledialog.cpp
Code: Select all
47,48c47,48
< /** File dialogs are native by default on Windows and MAC. */
< #if defined(Q_WS_WIN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAC)
---
> /** File dialogs are native by default on Windows. */
> #if defined(Q_WS_WIN) || defined(Q_WS_MAEMO_5)
255c255
< #if (defined Q_WS_WIN || defined Q_WS_MAC )
---
> #ifdef Q_WS_WIN
315,316c315,316
<     if (customWidget){}
<      //d->w->setCustomWidget(QString(), customWidget);
---
>     if (customWidget)
>      d->w->setCustomWidget(QString(), customWidget);
964c964
< #if (defined Q_WS_WIN || defined Q_WS_MAC )
---
> #ifdef Q_WS_WIN
1053c1053
< #endif // Q_WS_WIN Q_WS_MAC
---
> #endif // Q_WS_WIN


And if you want to add an unified title and tool bar for your kde apps, do something like this.

kdelibs-4.7.3/kdeui/widgets/kmainwindow.cpp
Code: Select all
243c243
<    q->setUnifiedTitleAndToolBarOnMac(TRUE);
---
>



Important. You need to apply the macports patch for the kdeinit issue.
https://trac.macports.org/browser/trunk/dports/kde/kdelibs4/files/workaround-kdeinit4-crash.patch
Some apps might not work right without it
RJVB
Registered Member
Posts
79
Karma
0
OS
Those patches are still valid in 4.12.5 - but note that they have the changed and not the original version on top.

I do notice that some applications, like kdenlive, still use KDE's file dialog for certain functions ... and they tend to be distorted as shown above.

 
Reply to topic

Bookmarks



Who is online

Registered users: Arkengheist, Baidu [Spider], Bing [Bot], cry, Google [Bot], kove, martinmucha, oki, timgoodwin