show currency in column header rather than in each row
This commit is contained in:
parent
533cdde366
commit
37caf97ee9
|
@ -400,8 +400,8 @@ class Plugin(BasePlugin, ThreadJob):
|
||||||
if rate is None:
|
if rate is None:
|
||||||
text = _(" (No FX rate available)")
|
text = _(" (No FX rate available)")
|
||||||
else:
|
else:
|
||||||
text = " (%s) 1 BTC~%s" % (self.value_str(btc_balance, rate),
|
text = " (%s %s) 1 BTC~%s %s" % (self.value_str(btc_balance, rate), self.ccy,
|
||||||
self.value_str(COIN, rate))
|
self.value_str(COIN, rate), self.ccy)
|
||||||
result['text'] = text
|
result['text'] = text
|
||||||
|
|
||||||
def get_historical_rates(self):
|
def get_historical_rates(self):
|
||||||
|
@ -414,7 +414,7 @@ class Plugin(BasePlugin, ThreadJob):
|
||||||
def value_str(self, satoshis, rate):
|
def value_str(self, satoshis, rate):
|
||||||
if rate:
|
if rate:
|
||||||
value = Decimal(satoshis) / COIN * Decimal(rate)
|
value = Decimal(satoshis) / COIN * Decimal(rate)
|
||||||
return "%s %s" % (self.ccy_amount_str(value, True), self.ccy)
|
return "%s" % (self.ccy_amount_str(value, True))
|
||||||
return _("No data")
|
return _("No data")
|
||||||
|
|
||||||
def historical_value_str(self, satoshis, d_t):
|
def historical_value_str(self, satoshis, d_t):
|
||||||
|
@ -429,7 +429,7 @@ class Plugin(BasePlugin, ThreadJob):
|
||||||
@hook
|
@hook
|
||||||
def history_tab_headers(self, headers):
|
def history_tab_headers(self, headers):
|
||||||
if self.show_history():
|
if self.show_history():
|
||||||
headers.extend([_('Fiat Amount'), _('Fiat Balance')])
|
headers.extend(['%s '%self.ccy + _('Amount'), '%s '%self.ccy + _('Balance')])
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
def history_tab_update_begin(self):
|
def history_tab_update_begin(self):
|
||||||
|
@ -445,7 +445,7 @@ class Plugin(BasePlugin, ThreadJob):
|
||||||
date = timestamp_to_datetime(0)
|
date = timestamp_to_datetime(0)
|
||||||
for amount in [value, balance]:
|
for amount in [value, balance]:
|
||||||
text = self.historical_value_str(amount, date)
|
text = self.historical_value_str(amount, date)
|
||||||
entry.append("%16s" % text)
|
entry.append(text)
|
||||||
|
|
||||||
def settings_widget(self, window):
|
def settings_widget(self, window):
|
||||||
return EnterButton(_('Settings'), self.settings_dialog)
|
return EnterButton(_('Settings'), self.settings_dialog)
|
||||||
|
|
Loading…
Reference in New Issue