diff options
author | C. Scott Ananian <cscott@laptop.org> | 2007-12-20 16:29:34 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2008-01-17 14:53:07 (GMT) |
commit | ee5e3ef686f9cafaae07cc72b843636a3701ce34 (patch) | |
tree | 9cab6c059f1b324da5013c669815dd138b9ce504 | |
parent | 8a78dcd9cc7e930dd69004ff12218af7f660d6bb (diff) |
Fix for #4909 landed different in sugar than in the patch attached to the bu
Instead of a method of the Activity class, it's a function defined in the
sugar.activity.activity module.
-rw-r--r-- | activity.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/activity.py b/activity.py index 6f6c9d1..90b46c7 100644 --- a/activity.py +++ b/activity.py @@ -37,11 +37,13 @@ class ViewSourceActivity(activity.Activity): jobject.destroy() self.journal_show_object(self.__source_object_id) def journal_show_object(self, object_id): - """Invoke parent class' journal_show_object if it exists.""" - s = super(ViewSourceActivity, self) - if hasattr(s, 'journal_show_object'): - s.journal_show_object(object_id) - + """Invoke journal_show_object from sugar.activity.activity if it + exists.""" + try: + from sugar.activity.activity import show_object_in_journal + show_object_in_journal(object_id) + except ImportError: + pass # no love from sugar. class VteActivity(ViewSourceActivity): def __init__(self, handle): |