appDisplay: Animate launch of new-window action in the AppIconMenu
We add our own "New Window" menu entry if the app doesn't already provide a 'new-window' action. For this menu entry, we show the zoom out animation on the app icon when the user clicks the entry. To be consistent in case the app already provides its own 'new-window' action via its AppInfo, also show the zoom out animation when this action is activated. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/662
This commit is contained in:
parent
c0047cd11d
commit
73850fee02
@ -2060,6 +2060,10 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
|||||||
let action = actions[i];
|
let action = actions[i];
|
||||||
let item = this._appendMenuItem(appInfo.get_action_name(action));
|
let item = this._appendMenuItem(appInfo.get_action_name(action));
|
||||||
item.connect('activate', (emitter, event) => {
|
item.connect('activate', (emitter, event) => {
|
||||||
|
if (action == 'new-window' &&
|
||||||
|
this._source.app.state == Shell.AppState.STOPPED)
|
||||||
|
this._source.animateLaunch();
|
||||||
|
|
||||||
this._source.app.launch_action(action, event.get_time(), -1);
|
this._source.app.launch_action(action, event.get_time(), -1);
|
||||||
this.emit('activate-window', null);
|
this.emit('activate-window', null);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user