def value_changed(self, _, value): if self._editorWidget2 is not None: self._editorWidget2.text = str(value) self._editorWidget.value = int(value) Logger.info("Config: " + self.section + self.option + " set to " + str(value)) Config.set(self.section, self.option, value) Config.write() Logger.info("Config: Saved config")
def start_mining(self): home = self.root.get_screen("HomeScreen") if Config.getboolean("Misc", "saveLogins"): Config.set("Misc", "username", home.ids["UsrNameInput"].text) Config.set("Misc", "password", encode(str(home.ids["PwdInput"].text), "JonIsGreen")) Config.write() Logger.info("Logins: Saved") Miner = self.root.get_screen("MiningScreen").Miner Miner.usrName = home.ids["UsrNameInput"].text Miner.pwdInput = home.ids["PwdInput"].text Miner.stopOnlyWhenStopPressed = home.ids["MineUntilOrForSwitch"].active Miner.mineUntilPoints = None if home.ids[ "PointsInput"].text == "" else home.ids["PointsInput"].text Miner.mineForTime = None if home.ids[ "TimeInput"].text == "" else home.ids["TimeInput"].text Miner.requireAll = home.ids["RequirementsAll"].state == "down" self.root.current = "MiningScreen"