Esempio n. 1
0
 def unit_dialog(self, item, dt):
     if self._unit_dialog is None:
         def cb(text):
             self.app._set_bu(text)
             item.bu = self.app.base_unit
         self._unit_dialog = ChoiceDialog(_('Denomination'), base_units.keys(), self.app.base_unit, cb)
     self._unit_dialog.open()
Esempio n. 2
0
 def unit_dialog(self, item, dt):
     if self._unit_dialog is None:
         def cb(text):
             self.app._set_bu(text)
             item.bu = self.app.base_unit
         self._unit_dialog = ChoiceDialog(_('Denomination'), base_units.keys(), self.app.base_unit, cb)
     self._unit_dialog.open()
Esempio n. 3
0
 def unit_dialog(self, item, dt):
     from choice_dialog import ChoiceDialog
     def cb(text):
         self.app._set_bu(text)
         item.bu = self.app.base_unit
     d = ChoiceDialog(_('Denomination'), base_units.keys(), self.app.base_unit, cb)
     d.open()
Esempio n. 4
0
 def _set_bu(self, value):
     assert value in base_units.keys()
     self.electrum_config.set_key('base_unit', value, True)
     self._trigger_update_status()
     self._trigger_update_history()
Esempio n. 5
0
 def _set_bu(self, value):
     assert value in base_units.keys()
     decimal_point = base_unit_name_to_decimal_point(value)
     self.electrum_config.set_key('decimal_point', decimal_point, True)
     self._trigger_update_status()
     self._trigger_update_history()
Esempio n. 6
0
 def _set_bu(self, value):
     assert value in base_units.keys()
     self.electrum_config.set_key('base_unit', value, True)
     self.update_status()
     if self.history_screen:
         self.history_screen.update()
Esempio n. 7
0
 def _set_bu(self, value):
     assert value in base_units.keys()
     self.electrum_config.set_key('base_unit', value, True)
     self.update_status()
     if self.history_screen:
         self.history_screen.update()
Esempio n. 8
0
 def _set_bu(self, value):
     assert value in base_units.keys()
     self.electrum_config.set_key('base_unit', value, True)
     self._trigger_update_status()
     self._trigger_update_history()
Esempio n. 9
0
 def _set_bu(self, value):
     assert value in base_units.keys()
     decimal_point = base_unit_name_to_decimal_point(value)
     self.electrum_config.set_key('decimal_point', decimal_point, True)
     self._trigger_update_status()
     self._trigger_update_history()