diff options
author | Andi_G <andigros72@googlemail.com> | 2011-08-21 03:04:53 (GMT) |
---|---|---|
committer | Andi_G <andigros72@googlemail.com> | 2011-08-21 03:04:53 (GMT) |
commit | 482c4ff9ded8686299a53399e419e6f557d17b61 (patch) | |
tree | f260889ced2278005f8bde72e884370f96b9e8d4 | |
parent | 253b35f3f03536737479278ad7bef8da11f321bd (diff) |
bug fix for loading document from journal
-rw-r--r-- | annoactivity.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/annoactivity.py b/annoactivity.py index d999881..25a9f8f 100644 --- a/annoactivity.py +++ b/annoactivity.py @@ -146,6 +146,7 @@ class AnnoActivity(activity.Activity): self._title = '' self._author = '' + self._model = None self._toc_model = None self._mimetype = None @@ -158,7 +159,6 @@ class AnnoActivity(activity.Activity): self._view = None self.dpi = _get_screen_dpi() - #self._model = None self._sidebar = Sidebar() self._sidebar.show() @@ -667,9 +667,13 @@ class AnnoActivity(activity.Activity): self.read_file(jobject.file_path) properties = jobject.metadata.get_dictionary().copy() _logger.debug('\n\n\nthe metadata properties: %s' % str(properties)) - self._url = properties['url'] - self._title = properties['title'] - self._author = properties['author'] + pkeys = properties.keys() + if 'url' in pkeys: + self._url = properties['url'] + if 'title' in pkeys: + self._title = properties['title'] + if 'author' in pkeys: + self._author = properties['author'] finally: chooser.destroy() del chooser |