messageTray: Move the notification policy classes here

The NotificationDaemon really should be for the hookup of remote
notifications, rather than policies.

https://bugzilla.gnome.org/show_bug.cgi?id=710115
This commit is contained in:
Jasper St. Pierre
2013-10-13 16:01:56 -04:00
parent da14e2c349
commit 66a4cb5875
5 changed files with 127 additions and 130 deletions

View File

@ -13,7 +13,6 @@ const Tp = imports.gi.TelepathyGLib;
const History = imports.misc.history;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const NotificationDaemon = imports.ui.notificationDaemon;
const Params = imports.misc.params;
const PopupMenu = imports.ui.popupMenu;
@ -416,7 +415,7 @@ const TelepathyClient = new Lang.Class({
_ensureAppSource: function() {
if (this._appSource == null) {
this._appSource = new MessageTray.Source(_("Chat"), 'empathy');
this._appSource.policy = new NotificationDaemon.NotificationApplicationPolicy('empathy');
this._appSource.policy = new MessageTray.NotificationApplicationPolicy('empathy');
Main.messageTray.add(this._appSource);
this._appSource.connect('destroy', Lang.bind(this, function () {
@ -488,7 +487,7 @@ const ChatSource = new Lang.Class({
},
_createPolicy: function() {
return new NotificationDaemon.NotificationApplicationPolicy('empathy');
return new MessageTray.NotificationApplicationPolicy('empathy');
},
_updateAlias: function() {
@ -1061,7 +1060,7 @@ const ApproverSource = new Lang.Class({
},
_createPolicy: function() {
return new NotificationDaemon.NotificationApplicationPolicy('empathy');
return new MessageTray.NotificationApplicationPolicy('empathy');
},
destroy: function() {