------------------------------------------------------------
revno: 223
committer: Seif Lotfy <s...@lotfy.com>
branch nick: bluebird
timestamp: Mon 2011-09-05 11:53:08 +0200
message:
  fixed datasource-registries failure to do the pre_insert
modified:
  extensions/ds-registry.vala
  test/dbus/dsr-test.py


--
lp:~zeitgeist/zeitgeist/bluebird
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird

Your team Zeitgeist Framework Team is subscribed to branch 
lp:~zeitgeist/zeitgeist/bluebird.
To unsubscribe from this branch go to 
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'extensions/ds-registry.vala'
--- extensions/ds-registry.vala	2011-09-05 08:46:11 +0000
+++ extensions/ds-registry.vala	2011-09-05 09:53:08 +0000
@@ -131,7 +131,7 @@
         construct
         {
             sources = new HashTable<string, DataSource> (str_hash, str_equal);
-
+            running = new HashTable<string, GenericArray<BusName?>>(str_hash, str_equal);
             // FIXME: load data sources
 
             // this will be called after bus is acquired, so it shouldn't block
@@ -256,7 +256,7 @@
                 "Datasource with unique ID: %s not found".printf (unique_id));
         }
         
-        public void pre_insert_events(GenericArray<Event?> events,
+        public override void pre_insert_events(GenericArray<Event?> events,
             BusName? sender)
         {
             foreach (string unique_id in running.get_keys())

=== modified file 'test/dbus/dsr-test.py'
--- test/dbus/dsr-test.py	2011-09-05 08:46:11 +0000
+++ test/dbus/dsr-test.py	2011-09-05 09:53:08 +0000
@@ -184,6 +184,11 @@
 		self.client._registry.SetDataSourceEnabled(self._ds1[0], True)
 		ds = list(self.client._registry.GetDataSources())[0]
 		self.assertEquals(ds[DataSource.Enabled], True)
+		
+		ids = self.insertEventsAndWait([Event.new_for_values(
+			subject_manifestation = "!stfu:File")])
+			
+		self.assertEquals(ids[0], 1)
 
 
 	def testGetDataSourceFromId(self):

_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to