[gnome-shell/wip/paging-release2: 20/24] appDisplay: Change keyboard focus from FolderPopup to FolderView
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging-release2: 20/24] appDisplay: Change keyboard focus from FolderPopup to FolderView
- Date: Sat, 31 Aug 2013 01:17:48 +0000 (UTC)
commit 095d51f58328f2b6faf69162c3bf10afebda4ab4
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 | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index fb5b7f0..ccb0316 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -921,9 +921,9 @@ const FolderView = new Lang.Class({
this.actor = new St.ScrollView({ overlay_scrollbars: true });
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
- let scrollableContainer = new St.BoxLayout({ vertical: true, reactive: true });
- scrollableContainer.add_actor(this._grid.actor);
- this.actor.add_actor(scrollableContainer);
+ this._scrollableContainer = new St.BoxLayout({ vertical: true, reactive: true });
+ this._scrollableContainer.add_actor(this._grid.actor);
+ this.actor.add_actor(this._scrollableContainer);
},
_getItemId: function(item) {
@@ -1004,6 +1004,10 @@ const FolderView = new Lang.Class({
return Math.min(this._grid.nRows(availWidthPerPage), maxRows);
},
+ setKeyboardFocus: function() {
+ this._scrollableContainer.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
+ },
+
setPaddingOffsets: function(offset) {
this._offsetForEachSide = offset;
}
@@ -1070,6 +1074,7 @@ const FolderIcon = new Lang.Class({
onCompleteMakeSpaceForPopUp: function() {
this._popup.popup();
+ this.view.setKeyboardFocus();
},
_calculateBoxPointerArrowSide: function() {
@@ -1213,7 +1218,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]