diff modules/feed.js @ 358:c00b3db58dcf

add 'snowl' to all observer topics to avoid conflicts with other extensions/core code; use the Observers component everywhere
author Myk Melez <myk@mozilla.org>
date Tue, 04 Nov 2008 12:11:07 -0800
parents 1db123f46ed7
children 6916b17a0536
line wrap: on
line diff
--- a/modules/feed.js	Mon Nov 03 18:02:27 2008 -0800
+++ b/modules/feed.js	Tue Nov 04 12:11:07 2008 -0800
@@ -93,14 +93,6 @@
   // the request succeeds, at which point we store it with the login manager.
   _authInfo: null,
 
-  // Observer Service
-  get _obsSvc() {
-    let obsSvc = Cc["@mozilla.org/observer-service;1"].
-                 getService(Ci.nsIObserverService);
-    this.__defineGetter__("_obsSvc", function() { return obsSvc });
-    return this._obsSvc;
-  },
-
 
   //**************************************************************************//
   // Class Composition Goo
@@ -308,7 +300,7 @@
     }
 
     if (messagesChanged)
-      this._obsSvc.notifyObservers(null, "messages:changed", null);
+      Observers.notify(null, "snowl:messages:changed", null);
 
     Observers.notify(this, "snowl:subscribe:get:end", null);
   },
@@ -598,7 +590,7 @@
       this.persist();
 
       // Let observers know about the new source.
-      this._obsSvc.notifyObservers(null, "sources:changed", null);
+      Observers.notify(null, "snowl:sources:changed", null);
 
       // Refresh the feed to import all its items.
       this.onRefreshResult(aResult);