Browse Source

exchange rates: call on_quotes in set_currency

283
ThomasV 9 years ago
parent
commit
3b44504644
  1. 2
      plugins/exchange_rate/exchange_rate.py
  2. 4
      plugins/exchange_rate/kivy.py
  3. 1
      plugins/exchange_rate/qt.py

2
plugins/exchange_rate/exchange_rate.py

@ -306,6 +306,7 @@ class FxPlugin(BasePlugin, ThreadJob):
self.ccy = ccy
self.config.set_key('currency', ccy, True)
self.get_historical_rates() # Because self.ccy changes
self.on_quotes()
def set_exchange(self, name):
class_ = self.exchanges.get(name) or self.exchanges.values()[0]
@ -319,7 +320,6 @@ class FxPlugin(BasePlugin, ThreadJob):
# a quote refresh
self.timeout = 0
self.get_historical_rates()
#self.on_fx_quotes()
def on_quotes(self):
pass

4
plugins/exchange_rate/kivy.py

@ -27,11 +27,11 @@ class Plugin(FxPlugin):
self.dispatcher = MyEventDispatcher()
def on_quotes(self):
self.print_error("on_quotes")
self.print_error("on_quotes", self.ccy)
self.dispatcher.dispatch('on_quotes')
def on_history(self):
self.print_error("on_history")
self.print_error("on_history", self.ccy)
self.dispatcher.dispatch('on_history')
def on_close(self):

1
plugins/exchange_rate/qt.py

@ -86,7 +86,6 @@ class Plugin(FxPlugin):
ccy = str(self.ccy_combo.currentText())
if ccy and ccy != self.ccy:
self.set_currency(ccy)
self.app.emit(SIGNAL('new_fx_quotes'))
self.hist_checkbox_update()
def hist_checkbox_update(self):

Loading…
Cancel
Save