[gnome-shell/wip/fmuellner/notification-redux+sass: 30/61] messageTray: Remove mute support
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux+sass: 30/61] messageTray: Remove mute support
- Date: Thu, 19 Feb 2015 14:11:09 +0000 (UTC)
commit 8203ed55573352b3cd0adaffff2bf32913d1c43e
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 17 03:49:24 2015 +0100
messageTray: Remove mute support
It was a nice feature, but with sources no longer being represented in
the UI, there is no longer a way for users to make use of it. If we want
to bring the feature back in the future, it would probably make more
sense to implement via the chat source's policy anyway.
js/ui/messageTray.js | 30 ++++--------------------------
1 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index eb27eda..c56ed76 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1244,7 +1244,6 @@ const Source = new Lang.Class({
this.iconName = iconName;
this.isChat = false;
- this.isMuted = false;
this.notifications = [];
@@ -1285,13 +1284,6 @@ const Source = new Lang.Class({
this.emit('title-changed');
},
- setMuted: function(muted) {
- if (!this.isChat || this.isMuted == muted)
- return;
- this.isMuted = muted;
- this.emit('muted-changed');
- },
-
// Called to create a new icon actor.
// Provides a sane default implementation, override if you need
// something more fancy.
@@ -1331,15 +1323,10 @@ const Source = new Lang.Class({
notification.acknowledged = false;
this.pushNotification(notification);
- if (!this.isMuted) {
- // Play the sound now, if banners are disabled.
- // Otherwise, it will be played when the notification
- // is next shown.
- if (this.policy.showBanners) {
- this.emit('notify', notification);
- } else {
- notification.playSound();
- }
+ if (this.policy.showBanners) {
+ this.emit('notify', notification);
+ } else {
+ notification.playSound();
}
},
@@ -1810,7 +1797,6 @@ const MessageTray = new Lang.Class({
source: source,
notifyId: 0,
destroyId: 0,
- mutedChangedId: 0
};
if (source.isClearable)
@@ -1820,13 +1806,6 @@ const MessageTray = new Lang.Class({
obj.notifyId = source.connect('notify', Lang.bind(this, this._onNotify));
obj.destroyId = source.connect('destroy', Lang.bind(this, this._onSourceDestroy));
- obj.mutedChangedId = source.connect('muted-changed', Lang.bind(this,
- function () {
- if (source.isMuted)
- this._notificationQueue = this._notificationQueue.filter(function(notification) {
- return source != notification.source;
- });
- }));
this.emit('source-added', source);
@@ -1842,7 +1821,6 @@ const MessageTray = new Lang.Class({
source.disconnect(obj.notifyId);
source.disconnect(obj.destroyId);
- source.disconnect(obj.mutedChangedId);
this.emit('source-removed', source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]