summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2012-12-06 11:42:31 +0100
committerSeif Lotfy <seif@lotfy.com>2012-12-06 11:42:31 +0100
commit74500f3d1804a72658d5fd1829fc65911699708a (patch)
tree657fa2aa030a8b346defee68f953c4b75c190fca
parentdd21da0bcdf1b20109973ba08a436879034c61ac (diff)
downloadzeitgeist-74500f3d1804a72658d5fd1829fc65911699708a.tar.gz
fix get_events to work around the new ownership fixes in vala
-rw-r--r--examples/python/find_events.py11
-rw-r--r--libzeitgeist/log.vala2
2 files changed, 9 insertions, 4 deletions
diff --git a/examples/python/find_events.py b/examples/python/find_events.py
index 5d7c5308..46869464 100644
--- a/examples/python/find_events.py
+++ b/examples/python/find_events.py
@@ -1,8 +1,13 @@
from gi.repository import Zeitgeist, Gtk
log = Zeitgeist.Log.get_default()
-def callback (x):
- print x
+def callback (log, result, data):
+ events = log.get_events_finish(result)
+ print len(events)
+ #for event in events:
+ # if event:
+ # print "==="
+ Gtk.main_quit()
-log.get_events([x for x in xrange(100)], None, callback, None)
+log.get_events([x for x in xrange(200, 222)], None, callback, None)
Gtk.main()
diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
index 68d0eac5..e0c11d62 100644
--- a/libzeitgeist/log.vala
+++ b/libzeitgeist/log.vala
@@ -276,7 +276,7 @@ public class Log : QueuedProxyWrapper
* @param cancellable To cancel the operation or NULL
*/
public async GenericArray<Event> get_events (
- Array<uint32> event_ids,
+ owned Array<uint32> event_ids,
Cancellable? cancellable=null) throws Error
{
yield wait_for_proxy ();