Help needed: mimetype problem in Cervisia

David Faure faure at kde.org
Sun Apr 25 22:17:37 BST 2004


On Sunday 25 April 2004 22:55, Christian Loose wrote:
> Am Freitag, 23. April 2004 18:08 schrieb Christian Loose:
> >
> > At the moment we have a problem in Cervisia  that I can't seem to resolve.
> > Please see BR #77440 (http://bugs.kde.org/show_bug.cgi?id=77440), it's
> > about the edit file action Cervisia provides.
> >
> > When activated Cervisia uses KRun to start an external editor for the
> > selected file. This works pretty well with source code files but it fails
> > e.g. with HTML documents, because it starts Konqueror (Viewer) instead of
> > Quanta or Kate (Editor).
> >
> > That's because AFAIK KRun starts the preferred application that can
> > _handle_ the given mimetype. But for the edit file action to make sense we
> > need a mechanism to retrieve the preferred _editor_ for the selected file.
> >
> > So far I couldn't find anything in our API that would give me this list of
> > editors.
> 
> Since there wasn't any reply to this part I guess there isn't an API yet. So 
> what about a X-KDE-Editor key similar to the existing X-KDE-Text key. Would 
> that work?

For the long run: check Waldo's "Mimetype Activation" post. I think the freedesktop
proposal includes such "actions".

For the shorter term: I don't think you want a flag in the mimetype !?? That makes no sense.
What you want is rather to define a servicetype (KDE/Editor), associate some apps
with it (quanta and kate, but not konqueror), and run your trader query with that servicetype
as an additional constraint.

-- 
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