Skip to content

Commit

Permalink
new default coin image if coin image file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
bluppfisk committed Jan 16, 2018
1 parent 1e5c3d3 commit efe9550
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions coin/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ def _start_exchange(self):
item.set_label('loading')

self.volume_item.set_label('loading')

home_currency = self.active_asset_pair.lower()[1:4]
self.indicator.set_icon(self.coin.config.get('project_root') + '/resources/' + home_currency + '.png')

if isfile(self.coin.config.get('project_root') + '/resources/' + home_currency + '.png'):
self.indicator.set_icon(self.coin.config.get('project_root') + '/resources/' + home_currency + '.png')
else:
self.indicator.set_icon(self.coin.config.get('project_root') + '/resources/unknown-coin.png')

# load new exchange instance
self.exchange_instance = [e.get('instance') for e in self.EXCHANGES if self.active_exchange == e.get('code')][0]
Expand Down
5 changes: 4 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ app:
name: Coin Price Indicator
description: A cryptocurrency price ticker applet for Ubuntu
url: https://github.com/nilgradisnik/coinprice-indicator
version: "0.9.9"
version: "1.0"

authors:
-
Expand Down Expand Up @@ -33,6 +33,9 @@ contributors:
-
name: Thepassith N.
email: [email protected]
-
name: Alessio Carrafa
email: [email protected]

artist:
name: Alicen Maniscalco
Expand Down
Binary file added resources/unknown-coin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit efe9550

Please sign in to comment.