[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 11:36:49
[Download RAW message or body]
On Thu, Feb 18, 1999 at 11:32:17AM +0000, Teodor Romeo Mihai wrote:
> David Faure wrote:
> >
> > 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
> >
>
> The version I have (taken from the CVS, on the KDE 1.1 release date)
> looks like that:
>
> void KService::initStatic()
> {
> if ( !s_lstServices )
> s_lstServices = new QList<KService>;
>
> /* // Read the application bindings in the local directories
> QString path = kapp->localkdedir().data();
> path += "/share/applnk";
> KService::initServices( path.data() );
>
> // Read the application bindings in the global directories
> path = kapp->kde_appsdir().copy();
> KService::initServices( path.data() ); */
> }
Same here.
> If the stuff above would not be commented, I could get a list of
> applications associated with a mimetype.
Did you read what I wrote ?
The stuff works, even with the bit above commented out. It works for
konqueror and it even works for koffice apps...
Create a Registry, add a KMimeTypeFactory to it, and try if it's enough
- I don't know since I didn't try and didn't get Torben's answer -
otherwise do the code like below :
> > 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.
>
> I suppose I should download KDE again...
>
> >
> > --
> > ____________________________________________________________________
> > | |
> > | David FAURE |
> > | E-mail : David.Faure@insa-lyon.fr, faure@kde.org |
> > | http://www.insa-lyon.fr/People/AEDI/dfaure/index.html |
> > |____________________________________________________________________|
>
>
> Regards,
> teddy
--
____________________________________________________________________
| |
| 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