workspace: Use AppIcon.app to check action-support by the drag source
`AppIcon.shellWorkspaceLaunch()` can easily be replaced by checking for `AppIcon.app` and calling `AppIcon.app.open_new_window()` directly. For compatibility and to prevent breaking extensions implementing the function, keep supporting the `shellWorkspaceLaunch` API in AppIcon while logging a deprecation warning. Also keep supporting the API on drag sources (without deprecating it) to allow extensions to define custom actions on their drag sources. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
This commit is contained in:

committed by
Florian Müllner

parent
e0947b01bd
commit
942758bb30
@ -2222,6 +2222,9 @@ var AppIcon = class AppIcon {
|
||||
}
|
||||
|
||||
shellWorkspaceLaunch(params) {
|
||||
let { stack } = new Error();
|
||||
log(`shellWorkspaceLaunch is deprecated, use app.open_new_window() instead\n${stack}`);
|
||||
|
||||
params = Params.parse(params, { workspace: -1,
|
||||
timestamp: 0 });
|
||||
|
||||
|
Reference in New Issue
Block a user