[gnome-shell/wip/paging-release2: 17/23] appDisplay: Change keyboard focus from FolderPopup to FolderView



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

    appDisplay: Change keyboard 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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706081

 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 79d146f..6e7bc19 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -983,6 +983,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
@@ -1054,6 +1058,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;
@@ -1239,7 +1256,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]