[gnome-shell] messageTray: hide the summary box pointer if all its notifications are destroyed
- From: Marina Zhurakhinskaya <marinaz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: hide the summary box pointer if all its notifications are destroyed
- Date: Thu, 8 Sep 2011 18:29:10 +0000 (UTC)
commit 9496b64c8631ea08b5213eb9f47a667679b9a316
Author: Marina Zhurakhinskaya <marinaz redhat com>
Date: Thu Sep 8 01:15:09 2011 -0400
messageTray: hide the summary box pointer if all its notifications are destroyed
This ensures that we don't show an animation of an empty blob being hidden when
clicking an action button causes the notification to be destroyed.
https://bugzilla.gnome.org/show_bug.cgi?id=658525
js/ui/messageTray.js | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 5ddc079..f2721cf 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2237,7 +2237,7 @@ MessageTray.prototype = {
_showSummaryBoxPointer: function() {
this._summaryBoxPointerItem = this._clickedSummaryItem;
this._summaryBoxPointerContentUpdatedId = this._summaryBoxPointerItem.connect('content-updated',
- Lang.bind(this, this._adjustSummaryBoxPointerPosition));
+ Lang.bind(this, this._onSummaryBoxPointerContentUpdated));
this._summaryBoxPointerDoneDisplayingId = this._summaryBoxPointerItem.connect('done-displaying-content',
Lang.bind(this, this._escapeTray));
if (this._clickedSummaryItemMouseButton == 1) {
@@ -2272,6 +2272,13 @@ MessageTray.prototype = {
}));
},
+ _onSummaryBoxPointerContentUpdated: function() {
+ if (this._summaryBoxPointerItem.notificationStack.get_children().length == 0)
+ this._hideSummaryBoxPointer();
+ this._adjustSummaryBoxPointerPosition();
+
+ },
+
_adjustSummaryBoxPointerPosition: function() {
// The position of the arrow origin should be the same as center of this._clickedSummaryItem.actor
if (!this._clickedSummaryItem)
@@ -2295,6 +2302,14 @@ MessageTray.prototype = {
},
_hideSummaryBoxPointer: function() {
+ // We should be sure to hide the box pointer if all notifications in it are destroyed while
+ // it is hiding, so that we don't show an an animation of an empty blob being hidden.
+ if (this._summaryBoxPointerState == State.HIDING &&
+ this._summaryBoxPointerItem.notificationStack.get_children().length == 0) {
+ this._summaryBoxPointer.actor.hide();
+ return;
+ }
+
this._summaryBoxPointerState = State.HIDING;
// Unset this._clickedSummaryItem if we are no longer showing the summary
if (this._summaryState != State.SHOWN)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]