[gnome-shell/wip/paging-release2: 16/22] appDisplay: Change keoyboard focus from FolderPopup to FolderView



commit d4db63c0424980e117417949decd87a741a2df63
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Mon Aug 26 10:59:39 2013 +0200

    appDisplay: Change keoyboard focus from FolderPopup to FolderView
    
    Since now FolderView has its own widget, the focus has to
    be moved to the widget inside the FolderView when the popup
    opens. Currently the focus was moved to the FolderPopup
    widget, which is wrong with the new implementation.

 js/ui/appDisplay.js |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 24f984c..7f66e39 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1003,6 +1003,10 @@ const FolderView = new Lang.Class({
         maxRowsPerPage -= 1;
         return maxRowsPerPage;
     },
+
+    setKeyboardFocus: function() {
+        this._widget.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
+    },
     
     updateBoxPointerOffsets: function(boxPointerOffsets) {
         // We have to ensure the folder view boxpointer and the close button
@@ -1074,6 +1078,19 @@ const FolderIcon = new Lang.Class({
         return usedHeight;   
     },
 
+    makeSpaceForPopUp: function() {
+        this._parentView.makeSpaceForPopUp(this, this._boxPointerArrowside, 
this.view.nRowsDisplayedAtOnce());
+    },
+
+    returnSpaceToOriginalPosition: function() {
+        this._parentView.returnSpaceToOriginalPosition();
+    },
+
+    onCompleteMakeSpaceForPopUp: function() {
+        this._popup.popup();
+        this.view.setKeyboardFocus();
+    },
+
     _calculateBoxPointerArrowSide: function() {
         let absoluteActorYPosition = this.actor.get_transformed_position()[1];
         let spaceTop = absoluteActorYPosition;
@@ -1259,7 +1276,6 @@ const AppFolderPopup = new Lang.Class({
             return;
 
         this.actor.show();
-        this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
 
         this._boxPointer.setArrowActor(this._source.actor);
         this._boxPointer.show(BoxPointer.PopupAnimation.FADE |


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