[Thunar-dev] D-Bus interface

Erik Harrison erikharrison at gmail.com
Tue Jan 31 23:49:52 CET 2006


On 1/31/06, Benedikt Meurer <benedikt.meurer at unix-ag.uni-siegen.de> wrote:
> I'd like to discuss the D-Bus interface(s) for Thunar, in order to fix
> bug #1384 for the alpha2 release. My initial idea was to put everything
> in one interface, but that's not a very good idea. So, there'll be
> several interfaces implemented by Thunar.
>
>
> Interface: org.xfce.FileManager
> ===============================
>
> This is the basic interface implemented by Xfce file managers (Thunar
> and Xffm, and whatever other file managers). Other applications can
> communicate with the active file manager using this interface. The file
> manager will request the name "org.xfce.FileManager" on startup (without
> replacing any previously bound name), and applications use this name (as
> destination) when communicating with the file manager. This way, Xfce
> applications don't need to depend on Thunar or Xffm directly, but can
> use whatever file manager is running.
>
> To make sure all file managers can easily support this interface, it
> contains only the most basic methods required by a file manager:
>
>   /* Display the folder at uri in a (new) window, returns error if
>    * uri is not supported, does not exist or does not refer to a
>    * folder.
>    */
>   VOID DisplayFolder (STRING uri)
>   VOID DisplayFolderOnDisplay (STRING uri, STRING display)
>
>   /* Opens the file properties dialog for the file at uri, returns
>    * error if uri is not supported or does not exist.
>    */
>   VOID DisplayFileProperties (STRING uri)
>   VOID DisplayFilePropertiesOnDisplay (STRING uri, STRING display)
>
>   /* Opens the uri with the preferred application. If uri is a folder
>    * a (new) file manager window should be opened, else if uri refers
>    * to an executable file, that file should be run. Otherwise the
>    * preferred application for uri will be determined and run with
>    * uri. Returns error if uri is not support or does not exist.
>    */
>   VOID Launch (STRING uri)
>   VOID LaunchOnDisplay (STRING uri, STRING display)
>

This seems pretty reaonsable.

I'd like to push this little API into one of the Xfce libraries.
Should it go in libgui? It should probably provide a nice fallback in
the absense of a registered file manager if possible, and possibly
also use the Xfce Prefered Apps framework so that Launch can open
non-file URIs. But that's drifting from the core discussion . . .

>
> Interface: org.xfce.thunar.FileManager
> ======================================
>
> This interface will include methods specific to Thunar, but available to
> other applications as well (but applications will depend on Thunar, if
> they use any of these methods). Dunno yet, what should be included here,
> open for suggestions.

Not sure either. The obvious are already taken care of by the generic API

>
>
> Interface: org.xfce.RunDialog
> =============================
>
> This would be implemented by the file managers (or whatever other
> application) and xfrun4 would just invoke OpenDialog(), falling back to
> a simple(!) run dialog if no service is registered. This way the "Run
> Application" dialog will appear instantly in the future (I doubt that
> time permits us to implement this properly in Thunar/Xffm, but
> nevertheless we can change xfrun4, so all we need to do afterwards is to
> change Thunar/Xffm, and people won't have to wait for Xfce 4.6).
>
>   /* Requests to display the run dialog using the specified
>    * working_directory as base directory for applications run
>    * from the dialog.
>    */
>   VOID OpenDialog (STRING working_directory)
>   VOID OpenDialogOnDisplay (STRING working_directory, STRING display)
>
>

I really don't like putting xfrun4 inside another app. But on the
other hand it lets filemanagers do things like open up file's and not
just run apps.

> Comments/suggestions welcome.
>
> Benedikt
> _______________________________________________
> Thunar-dev mailing list
> Thunar-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/thunar-dev
>


--
Erik

"If Beethoven had been killed in a plane crash at the age of 22, it
would have changed the history of music... and of aviation."



More information about the Thunar-dev mailing list