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

List:       kde-i18n
Subject:    Re: kfm and mimetypes
From:       David Faure <David.Faure () insa-lyon ! fr>
Date:       1999-02-18 7:49:17
[Download RAW message or body]

On Wed, Feb 17, 1999 at 08:45:01PM -0500, Dawit Alemayehu wrote:
> On Wed, 17 Feb 1999, Teodor Romeo Mihai wrote:
> >Hi,
> >
> >a short issue concerning kfm and mimetypes:
> >
> >Right now there is no support in kdelibs for finding what applications
> >are associated with a certain mimetype; the original design was built
> >around kservice, but that is disabled (the code for initializing
> >kservices by scanning the kdelnk files, in KService::initStatic() is
> >commented out for some reason, even if it would work fine otherwise).
It's not disabled - it lets you call it when you want

> >Therefore kfm seems to be the only choice for running the application
> >associated with a mimetype. Is this behaviour definitive?
No, of course.

> I think it is, at least for now.  As it is the mime-binding class is located
> under kdebase/kfm.  I definitely agree with you in the point that this class
> should really be part of the core-library in some shape or form.

No, that's old stuff.

New mimetype stuff is in libkio, but Torben changed it recently and to use
it now, I found no other way than 

      registry = new KRegistry;
      registry->addFactory( new KMimeTypeFactory );
 
      registry->load( "/tmp/whatever" );
      if ( registry->isModified() )
      {
          registry->save( "/tmp/whaveter" );
          registry->clearModified();
      }
 
      KMimeType::check();
 
      KMimeMagic::initStatic();

(code I took from konqueror and recently put in
kofficecore/koFilterManager)
Looks ugly, I know.

I wrote Torben but didn't get an answer yet.


-- 
 ____________________________________________________________________
|                                                                    |
|  David FAURE                                                       |
|  E-mail : David.Faure@insa-lyon.fr, faure@kde.org                  |
|  http://www.insa-lyon.fr/People/AEDI/dfaure/index.html             |
|____________________________________________________________________|

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

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