~submarine/unity-scope-yelp/trunk

« back to all changes in this revision

Viewing changes to src/unity_yelp_daemon.py

  • Committer: David Callé
  • Date: 2013-05-14 13:31:34 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: davidc@framli.eu-20130514133134-ztbfq5phhjms1ipd
Fix preview test

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
        image = Gio.ThemedIcon.new(self.result.icon_hint)
171
171
        preview = Unity.GenericPreview.new(
172
172
            self.result.title, html.escape(self.result.comment), image)
173
 
        preview.props.subtitle = self.result.metadata['manual'].get_string()
 
173
        if self.result.metadata:
 
174
            preview.props.subtitle = self.result.metadata['manual'].get_string()
174
175
        icon = Gio.FileIcon.new (Gio.file_new_for_path(PROVIDER_ICON))
175
176
        action = Unity.PreviewAction.new("open", _("Open"), icon)
176
177
        preview.add_action(action)