telepathyClient: fix summaryNotification to grow properly on updates

When adding more lines to the notification, we need to move it up as
well, or else the new lines will end up underneath the summary or
offscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=615004
This commit is contained in:
Dan Winship 2010-04-07 12:53:52 -04:00
parent 10ac42d6ad
commit 5012d64580

View File

@ -908,6 +908,17 @@ MessageTray.prototype = {
time: ANIMATION_TIME, time: ANIMATION_TIME,
transition: "easeOutQuad" transition: "easeOutQuad"
}); });
if (!this._reExpandSummaryNotificationId)
this._reExpandSummaryNotificationId = this._summaryNotificationBin.connect('notify::height', Lang.bind(this, this._reExpandSummaryNotification));
},
_reExpandSummaryNotification: function() {
this._tween(this._summaryNotificationBin, "_summaryNotificationState", State.SHOWN,
{ y: this.actor.height - this._summaryNotificationBin.height,
time: ANIMATION_TIME,
transition: "easeOutQuad"
});
}, },
_hideSummaryNotification: function() { _hideSummaryNotification: function() {
@ -921,6 +932,11 @@ MessageTray.prototype = {
onComplete: this._hideSummaryNotificationCompleted, onComplete: this._hideSummaryNotificationCompleted,
onCompleteScope: this onCompleteScope: this
}); });
if (this._reExpandSummaryNotificationId) {
this._summaryNotificationBin.disconnect(this._reExpandSummaryNotificationId);
this._reExpandSummaryNotificationId = 0;
}
}, },
_hideSummaryNotificationCompleted: function() { _hideSummaryNotificationCompleted: function() {