Hook up activate on search entry to launch if only one app displayed

svn path=/trunk/; revision=90
This commit is contained in:
Colin Walters
2008-11-28 22:05:09 +00:00
parent fae6839eb8
commit 10d5aaca83
2 changed files with 44 additions and 6 deletions

View File

@ -82,15 +82,25 @@ _init : function(width) {
this._group.add_actor(this._searchEntry);
global.stage.set_key_focus(this._searchEntry);
this._searchQueued = false;
this._searchEntry.connect('notify::text', function (se, prop) {
this._searchActive = false;
this._searchEntry.connect('notify::text', function (se, prop) {
if (me._searchQueued)
return;
Mainloop.timeout_add(250, function() {
let text = me._searchEntry.text;
me._searchQueued = false;
me._appdisplay.setSearch(me._searchEntry.text);
me._searchActive = text != '';
me._appdisplay.setSearch(text);
return false;
});
});
this._searchEntry.connect('activate', function (se) {
log("activate " + me._searchActive);
if (!me._searchActive)
return false;
me._appdisplay.searchActivate();
return true;
});
let appsText = new Clutter.Label({ color: SIDESHOW_TEXT_COLOR,
font_name: "Sans Bold 14px",