[gnome-shell/wip/gtk-notification: 17/22] notificationDaemon: Rename the existing implementation to the FdoNotificationSource



commit 670fee99a61a53bba8cf7f103273e4e387cc36ef
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Oct 13 10:44:28 2013 -0400

    notificationDaemon: Rename the existing implementation to the FdoNotificationSource
    
    We'll add a new, simpler backend that's used by the newer GNotification API.

 js/ui/notificationDaemon.js |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 3449bb1..aa57005 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -30,7 +30,7 @@ function Bus() {
     return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus');
 }
 
-const NotificationDaemonIface = <interface name="org.freedesktop.Notifications">
+const FdoNotificationsIface = <interface name="org.freedesktop.Notifications">
 <method name="Notify">
     <arg type="s" direction="in"/>
     <arg type="u" direction="in"/>
@@ -103,11 +103,11 @@ const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
     'ibus-ui-gtk': 'keyboard'
 };
 
-const NotificationDaemon = new Lang.Class({
-    Name: 'NotificationDaemon',
+const FdoNotificationDaemon = new Lang.Class({
+    Name: 'FdoNotificationDaemon',
 
     _init: function() {
-        this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(NotificationDaemonIface, this);
+        this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(FdoNotificationsIface, this);
         this._dbusImpl.export(Gio.DBus.session, '/org/freedesktop/Notifications');
 
         this._sources = [];
@@ -203,7 +203,7 @@ const NotificationDaemon = new Lang.Class({
             return source;
         }
 
-        let source = new Source(title, pid, sender, trayIcon, ndata ? ndata.hints['desktop-entry'] : null);
+        let source = new FdoNotificationDaemonSource(title, pid, sender, trayIcon, ndata ? 
ndata.hints['desktop-entry'] : null);
 
         this._sources.push(source);
         source.connect('destroy', Lang.bind(this, function() {
@@ -508,8 +508,8 @@ const NotificationDaemon = new Lang.Class({
     }
 });
 
-const Source = new Lang.Class({
-    Name: 'NotificationDaemonSource',
+const FdoNotificationDaemonSource = new Lang.Class({
+    Name: 'FdoNotificationDaemonSource',
     Extends: MessageTray.Source,
 
     _init: function(title, pid, sender, trayIcon, appId) {
@@ -674,3 +674,11 @@ const Source = new Lang.Class({
         }
     }
 });
+
+const NotificationDaemon = new Lang.Class({
+    Name: 'NotificationDaemon',
+
+    _init: function() {
+        this._fdoNotificationDaemon = new FdoNotificationDaemon();
+    },
+});


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]