[gnome-shell/wip/paging-release: 73/85] Don't remember collection view scroll positions when between calls



commit 59c09f41d0e5ca28018749aeef9c6853a96063e5
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Wed Jul 24 19:07:03 2013 +0200

    Don't remember collection view scroll positions when between calls

 js/ui/appDisplay.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 0b33711..fcfae43 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1161,8 +1161,8 @@ const FolderView = new Lang.Class({
 
     addApp: function(app) {
         //FIXME
-        if(this._allItems.length > 0)
-            return;
+        /*if(this._allItems.length > 0)
+            return;*/
         this._addItem(app);
     },
 
@@ -1312,6 +1312,10 @@ const FolderView = new Lang.Class({
         this._boxPointerOffsets['padding'] = padding;
         this._boxPointerOffsets['closeButtonOverlap'] = closeButtonOverlap;
         
+    },
+    
+    setScrollToStart: function() {
+        this.actor.vscroll.adjustment.value = 0;
     }
 });
 
@@ -1349,6 +1353,7 @@ const FolderIcon = new Lang.Class({
         this.actor.connect('clicked', Lang.bind(this,
             function() {
                 this._ensurePopup();
+                this.view.setScrollToStart();
             }));
         this.actor.connect('notify::mapped', Lang.bind(this,
             function() {
@@ -1485,7 +1490,6 @@ const FolderIcon = new Lang.Class({
         } else {
             
             this._boxPointerArrowside = this._calculateBoxPointerArrowSide();
-            global.log("arrow side " + this._boxPointerArrowside);
             if(!this._popup) {
                 this._popup = new AppFolderPopup(this, this._boxPointerArrowside);
                 this._parentView.addFolderPopup(this._popup);


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