messageTray: Clean up and consolidate code for tween completion

https://bugzilla.gnome.org/show_bug.cgi?id=685341
This commit is contained in:
Jasper St. Pierre 2012-10-02 19:17:16 -03:00
parent 9fac285b69
commit be24ee435c

View File

@ -2141,17 +2141,9 @@ const MessageTray = new Lang.Class({
}, },
_hideDesktopClone: function(now) { _hideDesktopClone: function(now) {
if (now) {
this._desktopClone.destroy();
this._desktopClone = null;
this._desktopCloneState = State.HIDDEN;
this._bottomMonitorGeometry = null;
return;
}
this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN, this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
{ y: 0, { y: 0,
time: ANIMATION_TIME, time: now ? 0 : ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: Lang.bind(this, function() { onComplete: Lang.bind(this, function() {
this._desktopClone.destroy(); this._desktopClone.destroy();