Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/journalactivity.py
diff options
context:
space:
mode:
authorReinier Heeres <rwh@rwh.(none)>2007-12-19 12:02:39 (GMT)
committer Reinier Heeres <rwh@rwh.(none)>2007-12-19 12:02:39 (GMT)
commit42aa12ea0e6c15dabd2ad25fd35e54c8022fe728 (patch)
treee65abd9683df14fa6bce0be84d68131054c8e47d /journalactivity.py
parentb815a1b2c5b285f37e1ed02dc20e55f2458ba193 (diff)
Implement ShowObject, #4909
Diffstat (limited to 'journalactivity.py')
-rwxr-xr-xjournalactivity.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/journalactivity.py b/journalactivity.py
index 3339573..6e9a8f5 100755
--- a/journalactivity.py
+++ b/journalactivity.py
@@ -74,6 +74,16 @@ class JournalActivityDBusService(dbus.service.Object):
self._parent.set_search(search_dict)
self._parent.search_grab_focus()
+ @dbus.service.method(J_DBUS_INTERFACE,
+ in_signature='s', out_signature='')
+ def ShowObject(self, object_id):
+ """Pop-up journal and show object with object_id"""
+
+ logging.debug('Trying to show object %s', object_id)
+
+ if self._parent.show_object(object_id):
+ self._parent.present()
+
def _chooser_response_cb(self, chooser, response_id, chooser_id):
logging.debug('JournalActivityDBusService._chooser_response_cb')
if response_id == gtk.RESPONSE_ACCEPT:
@@ -208,6 +218,14 @@ class JournalActivity(activity.Activity):
self.set_canvas(self._secondary_view)
self._secondary_view.show()
+ def show_object(self, object_id):
+ jobject = datastore.get(object_id)
+ if jobject is None:
+ return False
+ else:
+ self._show_secondary_view(jobject)
+ return True
+
def _entry_erased_cb(self, toolbar):
self._show_main_view()