[RFC] KConfig API stuff - amended proposal

David Faure faure at kde.org
Mon Oct 22 23:22:55 BST 2007


On Monday 22 October 2007, Thomas Braxton wrote:
> On 10/22/07, Oswald Buddenhagen <ossi at kde.org> wrote:
> >
> > On Mon, Oct 22, 2007 at 08:18:20PM +0200, Kevin Krammer wrote:
> > > On Monday 22 October 2007, Oswald Buddenhagen wrote:
> > > > given the somewhat sicko mix of xdg lists and kde lists in some of our
> > > > .desktop files, the two methods read/writeXdgListEntry will be added.
> > > > it's clear that those functions will simply refuse to work with other
> > > > backends.
> > >
> > > Wouldn't "XDG-style INI" just be another backend?
> > >
> > no, because as stated a few lines above, we our .desktop files have both
> > xdg and kde style lists in one file.
> 
> 
> Then I would say the .desktop files are broken. If it is named .desktop it
> should follow the spec and only have XDG-style lists, otherwise other
> XDG-capable programs won't be able to read them correctly.

Other programs don't know about our KDE keys.

Let me explain what Oswald was trying to say (after I showed him:)
open share/applications/kde4/cervisia.desktop and you'll see 

ServiceTypes=KParts/ReadOnlyPart,Browser/View
X-KDE-Library=libcervisiapart
[...]
Exec=cervisia -caption "%c" %i %u
Categories=Qt;KDE;Development;

The Categories stuff is XDG-standard so it uses ';'.
The ServiceTypes line is kde-specific so (since that was the default in kde2 and kde3's KConfig) it uses ','.
Other XDG-capable programs only care about the binary defined in that desktop file
(Exec, Categories), while KDE also cares about the part defined there (servicetypes, library).

OK it was old practice to define both things into the same file, and nowadays I rather
recommend one file for each (also helps setting up proper preferences when the
app and the part aren't in the same file), but you get the point.
Another example would be those desktop files for kcontrol modules, which have an Exec line
and Categories for the desktop entry standard, but also a Keywords=foo,bar line for kde.

Sure we can break it all and define something else for kde4, but it's getting late for that,
and it's IMHO not worth the breakage.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list