More about "intents": Several improvements to desktop files and caches
Jerome Leclanche
adys.wh at gmail.com
Sun Jan 5 18:52:52 PST 2014
On Mon, Jan 6, 2014 at 2:42 AM, Ryan Lortie <desrt at desrt.ca> wrote:
> hi,
>
> On Sun, Jan 5, 2014, at 20:25, Jerome Leclanche wrote:
>> Problem #1
>> Apps cannot enumerate other apps of a specific type. A couple of
>
> It is my "intent" (ha...) to raise for a while that I want to introduce
> a new key to desktop files called "Implements". There is already some
> discussion about that here:
> https://bugzilla.gnome.org/show_bug.cgi?id=712391
>
>
> In terms of the desktop entry spec, such an addition would be extremely
> simple: we have a new 'string list' key called "Implements" with no
> particular meaning except that each entry in the list is expected to be
> in D-Bus interface name style.
>
> This would solve your "enumerate apps of a specific type" assuming that
> you have someone willing to specify, concretely, what it means to be a
> given type of application. Taking your 'terminal emulator' example from
> another part of this mail, we could have an
> org.freedesktop.TerminalEmulator interface (that may not be an actual
> D-Bus interface) that specifies what you must do if you're a terminal
> emulator and what you can expect a terminal emulator to do if you find
> its desktop file via a lookup on
> "Implements=org.freedesktop.TerminalEmulator".
>
> *Often* this will imply that an application implements said interface on
> the same object path as the org.freedesktop.Application interface, but
> this is not a hard requirement. I suspect it would be a recommendation,
> though.
>
> I'd be happy to write up a patch to the spec for this part at least.
> It's been on the long tail of my TODO list for a while, and if you need
> it too, that bumps the priority a bit for me.
>
> Of course, we would then create an index based on this item in the
> desktop cache so that we could very rapidly lookup "give me all apps
> that are terminal emulators".
>
> Cheers
Yes, that was my original idea with intents. I reconsidered after some
discussion though: It is much easier to use the existing Categories
key and improve upon it. Intents themselves can be dbus-only and the
same format as you mentioned, while improving Categories has the major
advantage that a lot of existing apps will be straight up compatible.
What do you think? Is there anything (non-dbus) in your Implements
idea that can't be solved by Categories? Keeping in mind that anything
that has a dbus interface might as well be an intent (or Implements,
or however it'd be called).
J. Leclanche
More information about the xdg
mailing list