[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    RE: KMimeType/KServiceType
From:       David Faure <David.Faure () cramersystems ! com>
Date:       1999-10-29 15:36:16
[Download RAW message or body]

> Hey guys:
> 
> What is the "proper" way to edit one of these?  I know I can query them
> for all sorts of information, but how am I supposed to make changes and
> then write it back to the system?  Do I have to load up the .desktop file
> directly?  What is the "Right" way to locate the desktop file 
> associated with a KMimeType or ServiceType?

libkio doesn't have API for that of course, since most apps only need to
read.

Using KConfig and writing directly the config file seems the way to go.
Locating the destination is of course to be done with locateLocal(...), as
done
in kpropsdlg.
Locating the source is to be done with locate(), no ?

I think the only thing you miss is the 'relative path' to the applnk
dir used to load a KService (e.g. Internet/kppp.desktop), just
what the m_sRelativePath field contains in kpropsdlg.cc
[but there we know the full path from the beginning, which is not the case
when you get a KService::Ptr]
I was thinking about adding that field to KService.
Same thing for KServiceType.
For mimetypes it's implicit in the mimetype name (text/plain ->
text/plain.desktop),
but for consistency it would be available as well (well a mimetype is a
service type anyway).

What do you think ?

--
David Faure
faure@kde.org - KDE developer
david@mandrakesoft.com - Mandrake
david.faure@cramersystems.com - Cramer Systems

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic