diff options
author | C. Scott Ananian <cscott@laptop.org> | 2007-12-20 16:28:45 (GMT) |
---|---|---|
committer | C. Scott Ananian <cscott@laptop.org> | 2007-12-20 19:50:34 (GMT) |
commit | c1eaa18bf060d5f86e49a72d57ec8441002eb53b (patch) | |
tree | ecaf6cb48591fc416cd919807c8448ed9936e53c /activity.py | |
parent | a4478f2e2a0ca76d824d38eb660d6c03cd74c5d4 (diff) |
Fix for #4909 landed different in sugar than in the patch attached to the bug.
Instead of a method of the Activity class, it's a function defined in the
sugar.activity.activity module, with a slightly different name.
Diffstat (limited to 'activity.py')
-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): |