~unity-team/unity-scope-calculator/saucy

« back to all changes in this revision

Viewing changes to src/unity_calculator_daemon.py

  • Committer: Tarmac
  • Author(s): James Henstridge
  • Date: 2013-05-13 09:35:24 UTC
  • mfrom: (36.1.1 unity-scope-calculator)
  • Revision ID: tarmac-20130513093524-99rwkwuu6jty4bz3
Add a calculator image to the scope preview.

Approved by David Callé, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
class Preview (Unity.ResultPreviewer):
147
147
 
148
148
    def do_run(self):
149
 
        preview = Unity.GenericPreview.new(self.result.title, '', None)
 
149
        image = Gio.ThemedIcon.new('gnome-calculator')
 
150
        preview = Unity.GenericPreview.new(self.result.title, '', image)
150
151
        preview.props.subtitle = self.result.comment
151
152
        open_action = Unity.PreviewAction.new("open", _("Open in calculator"), None)
152
153
        preview.add_action(open_action)