diff options
Diffstat (limited to 'annoactivity.py')
-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 |