No subject


Mon Apr 5 08:16:41 PDT 2010


remoting interface for an application first.  There is some prior art
in this area:

* GApplication as designed on the current wiki page above
  - Quite good, but we need to figure out what the DBus interface is
  - Would like GTK+ to inject some standard actions like Quit
  - Would like to avoid requiring a well-known DBus name and instead
use the .desktop file (apps *must* have a .desktop file anyways now)

* XSMP
  - doesn't allow us to implement menus
  - is designed around the "log in, work, log out" thin client model

* GNOME session: http://live.gnome.org/SessionManagement/GnomeSession
  - is an API potentially usable both for "desktop infrastructure" and
apps, but is mostly used by the former at the moment (as far as I
know)
  - no API for menus currently, though that could be changed

* OSSO: http://maemo.org/api_refs/5.0/5.0-final/libosso/
  - ( Maemo/Meego people please fill me in on this )
  - Apps to define a DBus .service file, but I can't find any references to a
    standard DBus interface here

* "Nautilus actions": http://www.nautilus-actions.org/?q=node/377
  So this is all about menus, which is good because that's what we need.
  The fundamental tradeoff made here is that the menus are defined statically,
  so there's no provision to change them at runtime, and I think in the long
  term we want that ability.  On the other hand, having them in the
.desktop file
  allows the system to show them when the app isn't running, which is
  a useful advantage.  On the other other hand, the actions you'd want to expose
  while an app isn't running seem like they'd often only partially intersect the
  actions you'd have while it is running.

A bit more on nautilus actions.  Let's say you're a note taking app.  You
might want to expose a menu with the 5 most recently used notes, in
addition to Quit and About.  Doing this in the .desktop file isn't possible.

So, let me strawman a bit.  Let's say we had these DBus interfaces:

org.freedesktop.Application
  method Quit()
  method ao GetActions()
  signal ActionsChanged(ao)

Where "ao" is array of object path, each object of which implements:

org.freedesktop.ApplicationAction
  property b Enabled
  method Invoke()

Now the current GApplication spec has actions which take arguments,
which is more oriented towards scripting.  My take is that this should
be a separate interface, or we just say you use GDbus directly.

Also, with this we can avoid requiring a well-known dbus name and say
that for a given app you can find it at the path
"/org/freedesktop/Application" from the unique name.  This means that
you can't (easily) have multiple apps in one process though.  Maybe we
could have a separate API for this case.


More information about the xdg mailing list