shell/app: Add method to activate an action via FDO DBus activation

There are multiple different places where we activate an app action,
but none set the correct activation token. Therefore this adds an async
method to to call `ActivateAction` on `org.freedesktop.Appliaction`
with the correct activation token/startup id as platform data.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3198>
This commit is contained in:
Julian Sparber
2024-02-19 09:30:25 +01:00
parent fbc8c28c0e
commit 54bc3aa4f5
3 changed files with 204 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Gio._promisify(Gio.DBusProxy.prototype, 'init_async');
Gio._promisify(Gio.DBusProxy.prototype, 'call_with_unix_fd_list');
Gio._promisify(Gio.File.prototype, 'query_info_async');
Gio._promisify(Polkit.Permission, 'new');
Gio._promisify(Shell.App.prototype, 'activate_action');
// We can't import shell JS modules yet, because they may have
// variable initializations, etc, that depend on this file's