From 2d80cb71db9f1335b46e2134df99c16d5cadc507 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 26 Sep 2013 15:16:45 -0400 Subject: [PATCH] searchDisplay: Scroll results when the user focuses a provider icon Otherwise, it seems odd to highlight results the user can't see simply by pressing down a lot. https://bugzilla.gnome.org/show_bug.cgi?id=708868 --- js/ui/searchDisplay.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 72aa13194..69c79a1af 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -214,8 +214,8 @@ const SearchResultsBase = new Lang.Class({ this.actor.hide(); }, - _keyFocusIn: function(icon) { - this.emit('key-focus-in', icon); + _keyFocusIn: function(actor) { + this.emit('key-focus-in', actor); }, _setMoreIconVisible: function(visible) { @@ -259,6 +259,7 @@ const ListSearchResults = new Lang.Class({ this._container = new St.BoxLayout({ style_class: 'search-section-content' }); this.providerIcon = new ProviderIcon(provider); + this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn)); this.providerIcon.connect('clicked', Lang.bind(this, function() { provider.launchSearch(this._terms); @@ -404,8 +405,8 @@ const SearchResults = new Lang.Class({ return false; }, - _keyFocusIn: function(provider, icon) { - Util.ensureActorVisibleInScrollView(this._scrollView, icon); + _keyFocusIn: function(provider, actor) { + Util.ensureActorVisibleInScrollView(this._scrollView, actor); }, createProviderDisplay: function(provider) {