Jumplists in Gnome-shell

Description

When the shell shows lists of applications (either running or non-running), a "jumplist" is a set of actions that can be performed with that application.

For the purposes of this discussion, we'll distinguish between two types of actions:

1. Opening files that you have used with that app.

2. Using actions that the application lets you perform.

For example, the shell shows "LibreOffice" as an icon. It could have the following jumplist as items in its contextual menu:

Open recently-used.odt
Open another-recently-used.ods
Open my-presentation.odp
------------------------------
Create a text document
Create a spreadsheet
Create a presentation

Owner

FedericoMenaQuintero

Involved parties

GnomeShell team

Zeitgeist team

Current status

There has been discussion about how to implement jumplists; see the References section below. For practical purposes, we can divide them into mostly orthogonal sections:

  • Files used with an application - retrieving this list is is Zeitgeist's job. See the note below.
  • Actions from non-running applications - Both Unity and KDE already have a scheme to publish actions in standard .desktop files. For example, there can be a "Create presentation" action within libreoffice.desktop that says something like this (this is not the correct syntax, but you get the idea):

[Action]
Name=Create Presentation
Command=ooimpress --new
Icon=ooimpress.png

This is described in Unity's documentation - I didn't have time to look up KDE's reference, but we should be able to standardize on something.

Update: this is currently under discussion at Freedesktop, and a proof-of-concept implementation exists for gio (664444).

Update 2: this was approved and is now included in the latest Desktop Entry Specification. The format is not that currently used by Unity, and instead was taken from a pre-1.0 version of the specification. gnome-shell code is now available in 669603.

  • Actions from running applications - For example, a music player may want a "Pause" command, which only makes sense when the music player is running. (A music player is a bad example because there already is a protocol to control music players, but you get the idea.). Ryan Lortie has been working on the "wip/menus" branch in glib, which essentially lets applications provide menu commands through D-Bus. This needs to be finished.

Update: This was finished for /ApplicationMenu. If a different menu needs to be shown in other places, it's just a matter of exporting a GMenu in the app and creating a RemoteMenu on the shell side - which means that if additional dbus object paths are standarized, it could be implemented as an extension for 3.4.

Note on Zeitgeist

There is an extension for gnome-shell, based on Zeitgeist, which already provides gnome-shell's contextual menus for apps with the files that have been used for each app. This is in https://github.com/seiflotfy/gnome-shell-zeitgeist-extension

This can obviously be implemented in terms of GtkRecentManager, but since we are moving *that* to using Zeitgeist internally, we may as well do the same in gnome-shell directly.

How to help

There is an extension for gnome-shell that lets you have jumplists with recently-used files. While we can continue to ship that extension, it would be better to have it directly in gnome-shell's code. This extension's code needs to be reviewed and polished.

We need to see how Unity and KDE handle actions defined in .desktop files, and see how to standardize this as part of the .desktop file specification. Then, we need to implement this in gnome-shell.

Ask RyanLortie about his progress with glib's GMenu. This will let us implement jumplist actions provided by applications that are already running.

References

DocumentCentricGnome#Jumplists

Design/Whiteboards/Jumplists (last edited 2012-04-25 19:18:54 by FedericoMenaQuintero)