KDE Developer
|
Hi, I'm experimenting a bit with the KDesktopFile class, but I'm not able to make it work:
executing it I get a distressing "", even if the file, I checked, has the field "Name=Open with File Manager". I tried even with
with no result. Does anyone know what I'm doing wrong? |
Administrator
|
If you try the following does anything get output?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
yes, it works, but it is not the "Name" field, but the name of the KConfigGroup, so it says "Desktop Entry"
|
Administrator
|
It is possible that KConfigGroup is trying to read the internationalised entry, which language do you have specified for KDE global settings?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
I've set US English, so it shouldn't be that, even because I can't read other fields, like Icon, that are not dependent on the language used.
|
Administrator
|
In the application, have you constructed a KApplication instance?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
it is not an application. I took the code of the device notifier plasmoid and I'm modifying it a bit.
|
Administrator
|
It should be fine then...
How are you testing your changes? By using plasmoidviewer? Or are you just loading it into Plasma itself?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
it doesn't matter, i tried both. maybe, since i'm using trunk, it is a bug.
now that i'm thinking about it i'll go and see the code of quicklaunch that reads the .desktop in order to set the icons, since it works here. |
KDE Developer
|
It seems like KDesktopFile has some problems with the files like the ones in /usr/share/apps/solid/actions/. i tried with /usr/share/applications/firefox.desktop and it works.
so i have to understand why it does this silly thing, since i need to read the solid ones. |
KDE Developer
|
ok, i solved.
obviously it was a stupid thing: these files have a group [Desktop Action open] and i have to get that KConfigGroup and read the entries from there.
Last edited by giucam on Mon Jun 01, 2009 2:50 pm, edited 1 time in total.
|
KDE Developer
|
so here is the result of all my efforts: Device Manager :-D
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]