[gnome-shell/wip/message-tray: 24/35] messageTray: Be able to "switch" notifications
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 24/35] messageTray: Be able to "switch" notifications
- Date: Sun, 19 Aug 2012 23:14:59 +0000 (UTC)
commit 5bf605bb6483b3ea92558f8854f9ae324ed5c575
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Aug 16 13:39:34 2012 -0400
messageTray: Be able to "switch" notifications
If you click on a summary item while another is up, we should
swap without an extra click.
js/ui/messageTray.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 94b9609..57106bc 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1633,10 +1633,8 @@ const MessageTray = new Lang.Class({
_onSummaryItemClicked: function(summaryItem, button) {
if (summaryItem.source.handleSummaryClick()) {
this._setClickedSummaryItem(null);
- } else if (!this._clickedSummaryItem) {
- this._setClickedSummaryItem(summaryItem, button);
} else {
- this._setClickedSummaryItem(null);
+ this._setClickedSummaryItem(summaryItem, button);
}
this._updateState();
@@ -2277,9 +2275,11 @@ const MessageTray = new Lang.Class({
_onSummaryBoxPointerUngrabbed: function() {
this._summaryBoxPointerState = State.HIDING;
- this._setClickedSummaryItem(null);
this._unlock();
+ if (this._summaryBoxPointerItem == this._clickedSummaryItem)
+ this._setClickedSummaryItem(null);
+
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
this._summaryBoxPointer.actor.hide();
this._hideSummaryBoxPointerCompleted();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]