[gnome-shell/wip/swarm: 12/13] Search: animate icons on new window



commit 12bf25e13346e06b67fa0b18efb276f30d264c63
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Thu Jun 26 21:32:04 2014 +0200

    Search: animate icons on new window

 js/ui/appDisplay.js |    2 +-
 js/ui/search.js     |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index aa3414e..8676e01 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1037,7 +1037,7 @@ const AppSearchProvider = new Lang.Class({
 
     createResultObject: function (resultMeta) {
         let app = this._appSys.lookup_app(resultMeta['id']);
-        return new AppIcon(app);
+        return new AppIcon(app, {}, { animateOnNewWindow: true });
     }
 });
 
diff --git a/js/ui/search.js b/js/ui/search.js
index f820688..904561b 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -6,6 +6,7 @@ const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
 const Meta = imports.gi.Meta;
 const Signals = imports.signals;
+const Shell = imports.gi.Shell;
 const St = imports.gi.St;
 const Atk = imports.gi.Atk;
 
@@ -349,6 +350,7 @@ const ListSearchResults = new Lang.Class({
         this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
         this.providerIcon.connect('clicked', Lang.bind(this,
             function() {
+                this.providerIcon.animateOut();
                 provider.launchSearch(this._terms);
                 Main.overview.toggle();
             }));
@@ -649,5 +651,12 @@ const ProviderIcon = new Lang.Class({
                                  gicon: provider.appInfo.get_icon() });
         this._content.add_actor(icon);
         this._content.add_actor(this.moreIcon);
+    },
+
+    animateOut: function() {
+        let appSys = Shell.AppSystem.get_default();
+        let app = appSys.lookup_app(this.provider.appInfo.get_id());
+        //if (app.state == Shell.AppState.STOPPED)
+        IconGrid.actorZoomOut(this._content);
     }
 });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]