viewSelector: Make backspace focus the search entry

Commit fb0cf64536 regressed this because
there's no unicode character for backspace.

https://bugzilla.gnome.org/show_bug.cgi?id=753319
This commit is contained in:
Rui Matos 2015-08-07 14:37:04 +02:00
parent 11cbd396c0
commit 45a6e2c305

View File

@ -465,6 +465,9 @@ const ViewSelector = new Lang.Class({
}, },
_shouldTriggerSearch: function(symbol) { _shouldTriggerSearch: function(symbol) {
if (symbol == Clutter.BackSpace && this._searchActive)
return true;
let unicode = Clutter.keysym_to_unicode(symbol); let unicode = Clutter.keysym_to_unicode(symbol);
if (unicode == 0) if (unicode == 0)
return false; return false;
@ -472,7 +475,7 @@ const ViewSelector = new Lang.Class({
if (getTermsForSearchString(String.fromCharCode(unicode)).length > 0) if (getTermsForSearchString(String.fromCharCode(unicode)).length > 0)
return true; return true;
return symbol == Clutter.BackSpace && this._searchActive; return false;
}, },
startSearch: function(event) { startSearch: function(event) {