Add tooltip delay to the preview pop-ups.

Showing previews after a delay allows the user to move the mouse around
the screen without triggering constant pop-ups.

Make sure we remove the pop-up when the user hits Escape and redisplay
the pop-up if we are updating the section results due to a change in space
allocated for it.

Rename protected variable _hasPreview to _showPreview in order to not have
the naming conflict with a new private variable _havePointer, which we
name in first person.
This commit is contained in:
Marina Zhurakhinskaya
2009-03-21 10:37:15 -04:00
parent afceea3fe6
commit dcc0f368bd
4 changed files with 67 additions and 28 deletions

View File

@@ -146,6 +146,11 @@ Sideshow.prototype = {
this._searchEntry.connect('key-press-event', function (se, e) {
let symbol = Shell.get_event_key_symbol(e);
if (symbol == Clutter.Escape) {
// We always want to hide the previews when the user hits Escape.
// If something that should have a preview gets displayed under
// the mouse pointer afterwards the preview will get redisplayed.
me._appDisplay.hidePreview();
me._docDisplay.hidePreview();
// Escape will keep clearing things back to the desktop. First, if
// we have active text, we remove it.
if (me._searchEntry.text != '')