Bug 568625: Ignore extra whitespace in search

svn path=/trunk/; revision=162
This commit is contained in:
Colin Walters 2009-01-21 22:37:02 +00:00
parent ce36eafc2f
commit 5280decb59

View File

@ -99,7 +99,11 @@ Sideshow.prototype = {
this._searchEntry.connect('key-press-event', function (se, e) { this._searchEntry.connect('key-press-event', function (se, e) {
let code = e.get_code(); let code = e.get_code();
if (code == 9) { if (code == 9) {
me._searchEntry.text = ''; // A single escape clears the entry, two of them hides the overlay
if (me._searchEntry.text == '')
me.emit('activated');
else
me._searchEntry.text = '';
return true; return true;
} else if (code == 111) { } else if (code == 111) {
// selectUp and selectDown wrap around in their respective displays // selectUp and selectDown wrap around in their respective displays