diff options
author | C. Scott Ananian <cscott@laptop.org> | 2007-12-20 16:29:34 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2007-12-21 14:29:20 (GMT) |
commit | 17c462757fca10bbf5c065c8ae3cc18bf40851ac (patch) | |
tree | 9cab6c059f1b324da5013c669815dd138b9ce504 | |
parent | 70396ca6436e9f11534fefbfd385491e90aacdf4 (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): |