From 63dc3a86de1fa50af2a3d3c02e98be25ef848b93 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 14 Nov 2007 18:45:48 +0000 Subject: added a dbus call to open the source data by the journal --- diff --git a/NEWS b/NEWS index f341fed..f843fb8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +* #4909: added a dbus call to open the source data by the journal (marco) * #4889: use the window's fullscreen method to get to fullscreen mode, this does not mess up the state the window manager has (erikos) * #4870: Add onStatusChange method to Download. (tomeu) diff --git a/browser.py b/browser.py index 877e8df..6d74313 100644 --- a/browser.py +++ b/browser.py @@ -18,6 +18,7 @@ import logging from gettext import gettext as _ +import dbus import gobject import gtk import tempfile @@ -143,10 +144,15 @@ class Browser(WebView): def _internal_save_cb(self): logging.debug("Saved source object to datastore.") - id = self._jobject.object_id + object_id = self._jobject.object_id service_name = 'org.laptop.AbiWordActivity' - self._cleanup_jobject() - activityfactory.create_with_object_id(service_name, id) + self._cleanup_jobject() + + bus = dbus.SessionBus() + bus_object = bus.get_object('org.laptop.Journal', + '/org/laptop/Journal') + journal = dbus.Interface(bus_object, 'org.laptop.Journal') + journal.Resume(service_name, object_id) def _internal_save_error_cb(self, err): logging.debug("Error saving source object to datastore: %s" % err) -- cgit v0.9.1