[gnome-shell] appDisplay: Animate launch of new-window action in the AppIconMenu
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] appDisplay: Animate launch of new-window action in the AppIconMenu
- Date: Thu, 8 Aug 2019 15:38:54 +0000 (UTC)
commit 73850fee0202867e684c0514f8a42d6512eb9079
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Aug 2 14:23:13 2019 +0200
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
js/ui/appDisplay.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index f6bab8bbb4..fc6c1290ea 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -2060,6 +2060,10 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
let action = actions[i];
let item = this._appendMenuItem(appInfo.get_action_name(action));
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.emit('activate-window', null);
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]