Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()