Add view-source-related methods HandleViewSource and GetDocumentPath

This commit is contained in:
Tomeu Vizoso 2008-11-07 16:23:54 +01:00
parent 9dcc432ae1
commit 6dfff85f9f
2 changed files with 18 additions and 0 deletions

View File

@ -1029,6 +1029,12 @@ class Activity(Window, gtk.Container):
metadata = property(get_metadata, None)
def handle_view_source(self):
raise NotImplementedError
def get_document_path(self, async_cb, async_err_cb):
async_err_cb(NotImplementedError())
# DEPRECATED
_shared_activity = property(lambda self: self.shared_activity, None)

View File

@ -68,3 +68,15 @@ class ActivityService(dbus.service.Object):
def Invite(self, buddy_key):
self._activity.invite(buddy_key)
@dbus.service.method(_ACTIVITY_INTERFACE)
def HandleViewSource(self):
self._activity.handle_view_source()
@dbus.service.method(_ACTIVITY_INTERFACE,
async_callbacks=('async_cb', 'async_err_cb'))
def GetDocumentPath(self, async_cb, async_err_cb):
try:
self._activity.get_document_path(async_cb, async_err_cb)
except Exception, e:
async_err_cb(e)