X-Git-Url: https://git.ralfj.de/lilass.git/blobdiff_plain/27cbfe7bc60957e63a6ba3e0845a9d7215f9e3d8..06344a9d0c2cbd40023d1db4ab966c0577234049:/question_frontend.py?ds=inline 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)