Always hide the info bar after a short timeout
We no longer want to keep the info bar showing for as long as the user is in the overview. We also want a shorter timeout.
This commit is contained in:
parent
21ff050a40
commit
6098dca0f8
@ -72,7 +72,7 @@ const SHADOW_WIDTH = 6;
|
|||||||
|
|
||||||
const NUMBER_OF_SECTIONS_IN_SEARCH = 2;
|
const NUMBER_OF_SECTIONS_IN_SEARCH = 2;
|
||||||
|
|
||||||
const INFO_BAR_HIDE_TIMEOUT = 30;
|
const INFO_BAR_HIDE_TIMEOUT = 10;
|
||||||
|
|
||||||
let wideScreen = false;
|
let wideScreen = false;
|
||||||
let displayGridColumnWidth = null;
|
let displayGridColumnWidth = null;
|
||||||
@ -107,9 +107,6 @@ InfoBar.prototype = {
|
|||||||
|
|
||||||
this._undoCallback = null;
|
this._undoCallback = null;
|
||||||
this._undo.connect('clicked', Lang.bind(this, this._onUndoClicked));
|
this._undo.connect('clicked', Lang.bind(this, this._onUndoClicked));
|
||||||
|
|
||||||
this._overviewWasHidden = false;
|
|
||||||
this._hidingOverviewId = 0;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUndoClicked: function() {
|
_onUndoClicked: function() {
|
||||||
@ -127,7 +124,6 @@ InfoBar.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_hide: function() {
|
_hide: function() {
|
||||||
this._overviewWasHidden = false;
|
|
||||||
Tweener.addTween(this.actor,
|
Tweener.addTween(this.actor,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
@ -139,31 +135,15 @@ InfoBar.prototype = {
|
|||||||
|
|
||||||
_onTimeout: function() {
|
_onTimeout: function() {
|
||||||
this._timeoutId = 0;
|
this._timeoutId = 0;
|
||||||
if (this._overviewWasHidden)
|
this._hide();
|
||||||
this._hide();
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onOverviewHiding: function() {
|
|
||||||
if (this._timeoutId == 0)
|
|
||||||
this._hide();
|
|
||||||
else
|
|
||||||
this._overviewWasHidden = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
setMessage: function(text, undoCallback, undoLabel) {
|
setMessage: function(text, undoCallback, undoLabel) {
|
||||||
if (this._timeoutId)
|
if (this._timeoutId)
|
||||||
Mainloop.source_remove(this._timeoutId);
|
Mainloop.source_remove(this._timeoutId);
|
||||||
|
|
||||||
if (this._hidingOverviewId == 0) {
|
|
||||||
// Set here, because when constructor is called, overview is null.
|
|
||||||
if (!Main.overview)
|
|
||||||
return;
|
|
||||||
// We don't actually use the ID, it's just a way of tracking whether we've hooked up the signal
|
|
||||||
this._hidingOverviewId = Main.overview.connect('hiding', Lang.bind(this, this._onOverviewHiding));
|
|
||||||
}
|
|
||||||
this._timeout = false;
|
this._timeout = false;
|
||||||
this._overviewWasHidden = false;
|
|
||||||
|
|
||||||
this._label.text = text;
|
this._label.text = text;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user