diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-12-19 12:02:16 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-12-19 12:02:16 (GMT) |
commit | c14abfb022e505607e8882f3203b02b69d14b135 (patch) | |
tree | d9c3bcad9d5635862a9b341ac28429673101a247 /lib | |
parent | d35c19b6aaeb79df700bf063f4bf3d298c20bf7a (diff) |
Wrap Journal.ShowObject, #4909
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sugar/activity/activity.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py index 7c44981..96e757a 100644 --- a/lib/sugar/activity/activity.py +++ b/lib/sugar/activity/activity.py @@ -76,6 +76,10 @@ SCOPE_PRIVATE = "private" SCOPE_INVITE_ONLY = "invite" # shouldn't be shown in UI, it's implicit when you invite somebody SCOPE_NEIGHBORHOOD = "public" +J_DBUS_SERVICE = 'org.laptop.Journal' +J_DBUS_PATH = '/org/laptop/Journal' +J_DBUS_INTERFACE = 'org.laptop.Journal' + class ActivityToolbar(gtk.Toolbar): """The Activity toolbar with the Journal entry title, sharing, Keep and Stop buttons @@ -905,3 +909,9 @@ def get_activity_root(): return os.environ['SUGAR_ACTIVITY_ROOT'] else: raise RuntimeError("No SUGAR_ACTIVITY_ROOT set.") + +def show_object_in_journal(object_id): + bus = dbus.SessionBus() + obj = bus.get_object(J_DBUS_SERVICE, J_DBUS_PATH) + journal = dbus.Interface(obj, J_DBUS_INTERFACE) + journal.ShowObject(object_id) |