[gnome-shell] calendar: Only show close button on messages that can be cleared
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Only show close button on messages that can be cleared
- Date: Thu, 12 Mar 2015 16:33:00 +0000 (UTC)
commit e72450f5d84ea147ba7de65e339bfa9f5d340189
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 11 22:33:20 2015 +0100
calendar: Only show close button on messages that can be cleared
Currently closing all messages is subtly different from clearing
a section, which is confusing. Start making the behavior more
predictable by only showing a close button in the message when
the section's clear button would remove it.
https://bugzilla.gnome.org/show_bug.cgi?id=746027
js/ui/calendar.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index e856720..af34966 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1137,13 +1137,13 @@ const Message = new Lang.Class({
}
},
- canClear: function() {
+ canClose: function() {
return true;
},
_sync: function() {
let hovered = this.actor.hover;
- this._closeButton.visible = hovered;
+ this._closeButton.visible = hovered && this.canClose();
this._secondaryBin.visible = !hovered;
},
@@ -1206,7 +1206,7 @@ const NotificationMessage = new Lang.Class({
this.setUseBodyMarkup(n.bannerBodyMarkup);
},
- canClear: function() {
+ canClose: function() {
return !this.notification.resident;
},
@@ -1376,7 +1376,7 @@ const MessageListSection = new Lang.Class({
clear: function() {
let messages = [...this._messages.keys()].filter(function(message) {
- return message.canClear();
+ return message.canClose();
});
// If there are few messages, letting them all zoom out looks OK
@@ -1405,7 +1405,7 @@ const MessageListSection = new Lang.Class({
_canClear: function() {
for (let message of this._messages.keys())
- if (message.canClear())
+ if (message.canClose())
return true;
return false;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]