+ def back(self):
+ if self.disableKeys:
+ return
+ print "getting back..."
+ print "stepHistory:", self.stepHistory
+ if len(self.stepHistory) > 1:
+ self.currStep = self.stepHistory[-2]
+ self.stepHistory = self.stepHistory[:-2]
+ if self.currStep < 1:
+ self.currStep = 1
+ print "currStep:", self.currStep
+ print "new stepHistory:", self.stepHistory
+ self.updateValues()
+ print "after updateValues stepHistory:", self.stepHistory
+
+ def markDone(self):
+ pass
+
+ def getStepWithID(self, id):
+ print "getStepWithID:", id
+ count = 0
+ for x in self.wizard.keys():
+ if self.wizard[x]["id"] == id:
+ print "result:", count
+ return count
+ count += 1
+ print "result: nothing"
+ return 0
+
+ def finished(self, gotoStep = None, *args, **kwargs):
+ print "finished"
+ self.prevStep = self.currStep
+ self.gotoStep = gotoStep
+
+ if self.updateValues not in self.onShown:
+ self.onShown.append(self.updateValues)
+
+ if self.showConfig:
+ if self.wizard[self.prevStep]["config"]["type"] == "dynamic":
+ eval("self." + self.wizard[self.prevStep]["config"]["evaluation"])()
+
+ if self.showList:
+ if (len(self.wizard[self.prevStep]["evaluatedlist"]) > 0):
+ print "current:", self["list"].current
+ nextStep = self["list"].current[1]
+ if (self.wizard[self.prevStep].has_key("listevaluation")):
+ exec("self." + self.wizard[self.currStep]["listevaluation"] + "('" + nextStep + "')")
+ else:
+ self.currStep = self.getStepWithID(nextStep)
+
+ if ((self.prevStep == self.numSteps and self.wizard[self.prevStep]["nextstep"] is None) or self.wizard[self.prevStep]["id"] == "end"): # wizard finished
+ print "wizard finished"
+ self.markDone()
+ self.close()