[gnome-shell/wip/swarm: 9/10] appDisplay: Reset to page 0 on exiting AllView
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 9/10] appDisplay: Reset to page 0 on exiting AllView
- Date: Tue, 10 Jun 2014 19:48:04 +0000 (UTC)
commit cea04e66efa159cc0df9b9a645b4f2d56697dea1
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Tue Jun 10 21:35:45 2014 +0200
appDisplay: Reset to page 0 on exiting AllView
Currently is only set to 0 when hidding overview.
But we can also exit AllView clicking the showApps
dash icon or other ways.
That causes inconsistency and AllView thinks the
current page is different than 0 when opened again.
Now that we always call animate() to open and exit
AllView we can rely on that to reset the currentPage
js/ui/appDisplay.js | 11 +++++++----
js/ui/iconGrid.js | 4 ++++
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index eee88bf..5b15007 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -343,10 +343,6 @@ const AllView = new Lang.Class({
this._availWidth = 0;
this._availHeight = 0;
- Main.overview.connect('hidden', Lang.bind(this,
- function() {
- this.goToPage(0);
- }));
this._grid.connect('space-opened', Lang.bind(this,
function() {
this._scrollView.get_effect('fade').enabled = false;
@@ -475,6 +471,13 @@ const AllView = new Lang.Class({
sourceSize: dashSize,
page: this._currentPage });
}
+
+ // Reset to the default, so when we open again AllView it
+ // opens in the page 0.
+ this._grid.connect('animation-done', Lang.bind(this,
+ function () {
+ this._currentPage = 0;
+ }));
}
},
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 8422433..469d476 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -459,6 +459,7 @@ const IconGrid = new Lang.Class({
this._animating = false;
item.actor.opacity = 255;
itemClone.actor.destroy();
+ this.emit('animation-done');
})
});
})
@@ -546,6 +547,7 @@ const IconGrid = new Lang.Class({
this._animating = false;
item.actor.opacity = 255;
itemClone.actor.destroy();
+ this.emit('animation-done');
})};
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
transition: 'easeInOutQuad',
@@ -568,6 +570,7 @@ const IconGrid = new Lang.Class({
if (isLastItem)
this._animating = false;
itemClone.actor.destroy();
+ this.emit('animation-done');
})};
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
transition: 'easeInOutQuad',
@@ -620,6 +623,7 @@ const IconGrid = new Lang.Class({
this._animating = false;
item.actor.opacity = 255;
itemClone.actor.destroy();
+ this.emit('animation-done');
})});
Tweener.addTween(itemClone.actor,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]