[gnome-shell/wip/swarm: 3/6] appDisplay: Allow animating appIcon on new window
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 3/6] appDisplay: Allow animating appIcon on new window
- Date: Thu, 3 Jul 2014 11:23:53 +0000 (UTC)
commit a383c2fcba3ba73b76c583ea2462f8feac5f4c2f
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Thu Jun 26 21:30:44 2014 +0200
appDisplay: Allow animating appIcon on new window
js/ui/appDisplay.js | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 68f4205..4e9a5c9 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1470,10 +1470,11 @@ Signals.addSignalMethods(AppFolderPopup.prototype);
const AppIcon = new Lang.Class({
Name: 'AppIcon',
- _init : function(app, iconParams) {
+ _init : function(app, iconParams, params) {
this.app = app;
this.id = app.get_id();
this.name = app.get_name();
+ this.params = Params.parse(params, { animateOnNewWindow: false });
this.actor = new St.Button({ style_class: 'app-well-app',
reactive: true,
@@ -1633,6 +1634,9 @@ const AppIcon = new Lang.Class({
this.app.state == Shell.AppState.RUNNING ||
button && button == 2;
+ if (this.params.animateOnNewWindow &&
+ (this.app.state == Shell.AppState.STOPPED || openNewWindow))
+ this.animateOut();
if (openNewWindow)
this.app.open_new_window(-1);
@@ -1642,6 +1646,10 @@ const AppIcon = new Lang.Class({
Main.overview.hide();
},
+ animateOut: function() {
+ this.icon.animateOut();
+ },
+
shellWorkspaceLaunch : function(params) {
params = Params.parse(params, { workspace: -1,
timestamp: 0 });
@@ -1729,6 +1737,10 @@ const AppIconMenu = new Lang.Class({
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
+ if (this._source.params.animateOnNewWindow &&
+ this._source.app.state == Shell.AppState.STOPPED)
+ this._source.animateOut();
+
this._source.app.open_new_window(-1);
this.emit('activate-window', null);
}));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]