diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-12-19 12:02:16 (GMT) |
---|---|---|
committer | Reinier Heeres <rwh@rwh.(none)> | 2007-12-19 12:03:36 (GMT) |
commit | 415e072c22cca3166055b8c563e23f066236fd91 (patch) | |
tree | 2e794aecfe54147f124bd6dca1404fbe714ec57d /lib | |
parent | 2d6d33a2dc4bbfa78aaa2cad9dec64864c5b0f03 (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) |