X-Git-Url: https://git.ralfj.de/lilass.git/blobdiff_plain/6adc8bd3434dec9bc70c4f8f5adc0e54f990339b..158f0efbe4109a5d3df516404caa8567ddf5e03c:/question_frontend.py diff --git a/question_frontend.py b/question_frontend.py index a17b7ca..fc9e8c6 100644 --- a/question_frontend.py +++ b/question_frontend.py @@ -40,6 +40,13 @@ class QuestionFrontend: return self.userChoose("Select resolution for %s"%displayname, modedescs, availablemodes, None) def setup (self, situation): + if situation.lastSetup: + applyLast = self.userChoose("This display is known. The last setup for it was like this:\n%s.\nApply the last used configuration?" % str(situation.lastSetup), ("Apply last setup", "Enter different setup"), (True,False), None) + if applyLast is None: + return None + if applyLast is True: + return situation.lastSetup + assert applyLast is False operationmodes = list(OperationMode) operationmodedescs = list(map(lambda x: x.text, operationmodes)) operationmode = self.userChoose ("Display setup", operationmodedescs, operationmodes, None)