Preferred Applications Framework
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Wed Feb 8 22:12:26 CET 2006
Jannis Pohlmann wrote:
> Hey Benny,
>
> I've been using the framework for a few days now and I'm quite exited.
> Anyway, I think there's one application type missing in the list: the
> favorite editor. Would be nice if we could add it as well since there
> are a lot of applications which ask you for your favorite editor, so
> you could just type exo-open wherever this is the case.
I don't think that this should be handled through another helper
category. The preferred editor is a property of the mime type in
question, that can be set using the file manager. This sounds more like
a use case for the Launch() method in the org.xfce.FileManager interface.
If you have an up2date Thunar running (with D-BUS support), you can open
any file using:
dbus-send --print-reply --dest=org.xfce.FileManager
/org/xfce/FileManager org.xfce.FileManager.Launch
string:"/absolute/path/to/the/file.txt" string:""
This will open the file in your favourite application, or if no
application is set, the application chooser will popup and let you
choose an application for the mime type.
If you want to limit yourself to Thunar, you can also run "Thunar
/path/to/file" - once I committed the latest changes :-) - and Thunar
will take care to run your preferred application for the given mime type.
The idea is to use this as a fallback for exo_url_show(), so you'll be
able to pass every kind of file to exo-open, and it'll take care of it
(falling back to the file manager).
I don't think it's necessary to add another category, esp. since you may
want to open different text files using different editors (i.e. user joe
might want to open .c/.h with Anjuta and .html/.xhtml with Bluefish).
> Regards,
> Jannis
Benedikt
More information about the Xfce4-dev
mailing list