示例#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'), list(base_units.keys()), self.app.base_unit, cb)
        self._unit_dialog.open()
示例#2
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()