diff options
author | Seif Lotfy <seif@lotfy.com> | 2012-12-22 17:40:49 +0100 |
---|---|---|
committer | Seif Lotfy <seif@lotfy.com> | 2012-12-22 17:40:49 +0100 |
commit | 3256917c6b8fa295016f4c680e7c22f70bcad98d (patch) | |
tree | a5f65b6a4199f120246480a42bd854cca989f12b /examples | |
parent | 6dd1918470d1d0a92671a9c2b0f2bf7bd1acc0f2 (diff) | |
download | zeitgeist-3256917c6b8fa295016f4c680e7c22f70bcad98d.tar.gz |
log.vala: Fix ownership of arugments due to new vala fix.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/python/get_events.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/python/get_events.py b/examples/python/get_events.py new file mode 100644 index 00000000..943a30b3 --- /dev/null +++ b/examples/python/get_events.py @@ -0,0 +1,15 @@ +from gi.repository import Zeitgeist, GObject +log = Zeitgeist.Log.get_default() +mainloop = GObject.MainLoop() + +def callback (log, result, data): + events = log.get_events_finish(result) + print events.size() + for i in xrange(events.size()): + event = events.next_value() + if event: + print event.get_property("id") + mainloop.quit() + +log.get_events([x for x in xrange(200, 222)], None, callback, None) +mainloop.run() |