From f4a1b0adce728e1325089310fff98457c982a408 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 5 Sep 2015 15:22:04 +0900 Subject: [PATCH] Fix Winkdex. --- plugins/exchange_rate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py index 845e2324..d6ebd6b4 100644 --- a/plugins/exchange_rate.py +++ b/plugins/exchange_rate.py @@ -180,7 +180,9 @@ class Winkdex(ExchangeBase): def historical_rates(self, ccy): json = self.get_json('winkdex.com', "/api/v0/series?start_time=1342915200") - return json['series'][0]['results'] + history = json['series'][0]['results'] + self.set_history(ccy, dict([(h['timestamp'][:10], h['price'] / 100.0) + for h in history])) class Exchanger(ThreadJob): @@ -342,7 +344,7 @@ class Plugin(BasePlugin): history_list.setColumnCount(7) # For unclear reasons setting this column to ResizeToContents # makes e.g. label editing very slow - history_list.setColumnWidth(6, 120) + history_list.setColumnWidth(6, 130) #window.history_list.header().setResizeMode(6, QHeaderView.ResizeToConte history_list.setHeaderLabels([ '', '', _('Date'), _('Description') , _('Amount'), _('Balance'), _('Fiat Amount')] ) for item, tx in entries: