=== modified file 'hamster/hamsterdbus.py'
--- hamster/hamsterdbus.py	2008-12-11 19:04:22 +0000
+++ hamster/hamsterdbus.py	2009-01-29 11:57:10 +0000
@@ -20,6 +20,8 @@
 import dbus
 import dbus.service
 
+from hamster import storage
+
 HAMSTER_URI = "org.gnome.hamster"
 HAMSTER_PATH = "/org/gnome/hamster"
 
@@ -34,6 +36,13 @@
     def get_activity(self):
         return self.activity
 
+    @dbus.service.method(HAMSTER_URI)
+    def get_autocomplete_activities(self):
+        activities = []
+        for a in storage.get_autocomplete_activities():
+            activities.append((a['name'] or '', a['category'] or ''))
+        return activities
+
     @dbus.service.signal(HAMSTER_URI)
     def update_activity(self, activity):
         self.activity = activity
@@ -42,6 +51,12 @@
     def get_fact(self):
         return self.fact
 
+    @dbus.service.method(HAMSTER_URI)
+    def add_fact(self, activity_name, start_time = None, end_time = None):
+        if activity_name == "":
+            return
+        storage.add_fact(activity_name)
+
     @dbus.service.signal(HAMSTER_URI)
     def update_fact(self, fact):
         self.fact = fact

