[gnome-shell] telepathyClient: fix summaryNotification to grow properly on updates



commit 5012d6458063fa4ac161ffc0f9e70d725767f143
Author: Dan Winship <danw gnome org>
Date:   Wed Apr 7 12:53:52 2010 -0400

    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

 js/ui/messageTray.js |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 345c630..e64aed6 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -908,6 +908,17 @@ MessageTray.prototype = {
                       time: ANIMATION_TIME,
                       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() {
@@ -921,6 +932,11 @@ MessageTray.prototype = {
                       onComplete: this._hideSummaryNotificationCompleted,
                       onCompleteScope: this
                     });
+
+        if (this._reExpandSummaryNotificationId) {
+            this._summaryNotificationBin.disconnect(this._reExpandSummaryNotificationId);
+            this._reExpandSummaryNotificationId = 0;
+        }
     },
 
     _hideSummaryNotificationCompleted: function() {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]