<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,9 +9,6 @@ import tralchemy
 from tralchemy.rdfs import Class
 
 if __name__ == '__main__':
-
-    holdrefs = []
-
     for cls in Class.get(notify=&quot;true&quot;):
         def added(subjects):
             print cls.uri, subjects
@@ -20,10 +17,9 @@ if __name__ == '__main__':
         def removed(subjects):
             print cls.uri, subjects
         kls = tralchemy.core.types.get_class(cls.uri)
-        kls.notifications.connect(&quot;SubjectsAdded&quot;, added)
-        kls.notifications.connect(&quot;SubjectsChanged&quot;, changed)
-        kls.notifications.connect(&quot;SubjectsRemoved&quot;, changed)
-        holdrefs.append(kls)
+        kls.added.subscribe(added)
+        kls.changed.subscribe(changed)
+        kls.removed.subscribe(removed)
 
     loop = glib.MainLoop()
     loop.run()</diff>
      <filename>examples/monitor.py</filename>
    </modified>
    <modified>
      <diff>@@ -53,14 +53,15 @@ def get_classname(classname):
 
 class Notifications(object):
     &quot;&quot;&quot; Class to allow users to attach signals to a class of object &quot;&quot;&quot;
-    def __init__(self, uri):
+    def __init__(self, uri, signal):
         self.uri = uri.replace(&quot;:&quot;, &quot;/&quot;)
+        self.signal = signal
 
-    def connect(self, signal, callback):
+    def subscribe(self, callback):
         def _(subjects):
             subjects = [str(subject) for subject in subjects]
             return callback(subjects)
-        bus.add_signal_receiver (_, signal_name=signal,
+        bus.add_signal_receiver (_, signal_name=self.signal,
                                  dbus_interface=&quot;org.freedesktop.Tracker.Resources.Class&quot;,
                                  path=&quot;/org/freedesktop/Tracker/Resources/Classes/%s&quot; % self.uri)
 
@@ -326,7 +327,9 @@ class WrapperFactory(object):
 
         # Does this class have notifications?
         if cls.notify:
-            attrs['notifications'] = Notifications(cls.uri)
+            attrs['added'] = Notifications(cls.uri, 'SubjectsAdded')
+            attrs['changed'] = Notifications(cls.uri, 'SubjectsChanged')
+            attrs['removed'] = Notifications(cls.uri, 'SubjectsRemoved')
 
         # Enumerate all properties of this class
         for prop in Property.get(domain=cls.uri):</diff>
      <filename>tralchemy/core.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>99574c99470ec1be6b7f676e2f2e01b517910533</id>
    </parent>
  </parents>
  <author>
    <name>John Carr</name>
    <email>john.carr@unrouted.co.uk</email>
  </author>
  <url>http://github.com/Jc2k/tralchemy/commit/5a9f5018ebcfa3e237ef614e40a0d9b10613cdba</url>
  <id>5a9f5018ebcfa3e237ef614e40a0d9b10613cdba</id>
  <committed-date>2009-07-04T12:25:03-07:00</committed-date>
  <authored-date>2009-07-04T12:25:03-07:00</authored-date>
  <message>Notifications tidyups</message>
  <tree>f288a3815a7a5e9eb46a6888315a354297ca959d</tree>
  <committer>
    <name>John Carr</name>
    <email>john.carr@unrouted.co.uk</email>
  </committer>
</commit>
