diff modules/twitter.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 57bbbcb76b0b
line wrap: on
line diff
--- a/modules/twitter.js	Mon Nov 03 18:02:27 2008 -0800
+++ b/modules/twitter.js	Tue Nov 04 12:11:07 2008 -0800
@@ -86,14 +86,6 @@
 
   _log: Log4Moz.Service.getLogger("Snowl.Twitter"),
 
-  // 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
@@ -269,7 +261,7 @@
     this.persist();
 
     // Let observers know about the new source.
-    this._obsSvc.notifyObservers(null, "sources:changed", null);
+    Observers.notify(null, "snowl:sources:changed", null);
 
     this.refresh();
   },
@@ -397,7 +389,7 @@
     }
 
     if (messagesChanged)
-      this._obsSvc.notifyObservers(null, "messages:changed", null);
+      Observers.notify(null, "snowl:messages:changed", null);
 
     // FIXME: if we added people, refresh the collections view too.