[gnome-shell/wip/fmuellner/notification-redux+sass: 114/122] 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: 114/122] messageTray: Remove mute support
- Date: Tue, 17 Feb 2015 15:13:33 +0000 (UTC)
commit 1db8e5db459a20f13b850e436460cad7215861ea
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 does no longer work without a source
representation in the UI ...
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 dfc6412..6fe98bd 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -706,7 +706,6 @@ const Source = new Lang.Class({
this.iconName = iconName;
this.isChat = false;
- this.isMuted = false;
this.notifications = [];
@@ -742,13 +741,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');
- },
-
createBanner: function(notification) {
return new NotificationBanner(notification);
},
@@ -796,15 +788,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();
}
},
@@ -971,7 +958,6 @@ const MessageTray = new Lang.Class({
source: source,
notifyId: 0,
destroyId: 0,
- mutedChangedId: 0
};
if (source.isClearable)
@@ -981,13 +967,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);
},
@@ -1001,7 +980,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]