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

List:       kde-core-devel
Subject:    Re: KIO patch
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-10-05 19:29:17
[Download RAW message or body]

On Vendredi 5 Octobre 2001 21:16, Bernd Gehrmann wrote:
> What about adding the two methods findByContent() and
> findByFileNameContent() to KMimeType, and marking
> KMimeMagic and KMimeMagicResult as deprecated? This
> would make a much simpler and more consistent API
> IMO.

Good idea, except that I wouldn't mark KMimeMagic* as deprecated,
it still gives more info than the KMimeType wrappers (for instance the
accuracy of the result, which maybe some apps might want to check.
This is just in case. I can't give examples of apps using it).

Also I'd name it findByFileContent instead of findByFileNameContent
(it's not the contents of the name we're going to look at ;)

> On a related thing, what is KService::allowAsDefault()
> good for?

For controlling whether this service is supposed to be used as
the "main application" for a type of files (if the user wants it), or not.
If not, it will appear in the "Open with" menus, but it won't be possible
to set it so that LMB (or KRun etc.) launches it.
Kind of "auxiliary applications" as opposed to "main handlers".
Like, a conversion tool, as opposed to a viewer.
Now, the feature is there (since Torben introduced it ;), but it doesn't seem
we're using it anywhere ;)

> I can't find any service where it's used

It's implicitly used by KServiceTypeProfile::preferredService(), to
implement the above.

> and also "AllowDefault" does not appear in DESKTOP_
> ENTRY_STANDARD.

Probably because it doesn't exist in gnome, and this also means it
should be called X-KDE-AllowDefault.

> Similarly, what is KServiceOffer::allowAsDefault()
> good for. Since keditfiletype always writes AllowAsDefault=true
> to profilerc, KServiceOffer::allowAsDefault() seems to
> be always equal to KServiceOffer::service()->allowAsDefault().
Well, yes, sure ;) A service offer is only the description of a service,
nothing more. IIRC the bool being copied is only a speed up issue
(used for sorting the offers).

Yes, the GUI tools always write AllowDefault=true, but I think this is 
more of an admin/developer feature, to make it possible to ship
a .desktop file for an application (e.g. converter) with "don't allow as default".

> (currently trying to write some documentation about the
> whole MIME stuff...)

For kdelibs' docu or for e.g. a book, if I may ask ? ;)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

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

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