diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2009-09-03 15:05:18 +0200 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2009-09-03 15:05:18 +0200 |
| commit | 53a6eecb41d1a7f0f926eb5bc0dd7322580f0e0c (patch) | |
| tree | 9f4d8182a9bd808a6de311fead391b1428693629 /lib/python | |
| parent | 0f1a2039b8e7197d344d93b1ab56d642e18216e0 (diff) | |
| download | enigma2-53a6eecb41d1a7f0f926eb5bc0dd7322580f0e0c.tar.gz enigma2-53a6eecb41d1a7f0f926eb5bc0dd7322580f0e0c.zip | |
allow exiting wizards with exit key if there is no step history (i.e. user is in the first step of the wizard)
Diffstat (limited to 'lib/python')
| -rwxr-xr-x | lib/python/Screens/Wizard.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py index 555110a4..6833c525 100755 --- a/lib/python/Screens/Wizard.py +++ b/lib/python/Screens/Wizard.py @@ -1,6 +1,7 @@ from Screen import Screen from Screens.HelpMenu import HelpableScreen +from Screens.MessageBox import MessageBox from Components.config import config, KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS from Components.Label import Label @@ -284,6 +285,8 @@ class Wizard(Screen): if len(self.stepHistory) > 1: self.currStep = self.stepHistory[-2] self.stepHistory = self.stepHistory[:-2] + else: + self.session.openWithCallback(self.exitWizardQuestion, MessageBox, (_("Are you sure you want to exit this wizard?") ) ) if self.currStep < 1: self.currStep = 1 print "currStep:", self.currStep @@ -291,6 +294,11 @@ class Wizard(Screen): self.updateValues() print "after updateValues stepHistory:", self.stepHistory + def exitWizardQuestion(self, ret = False): + if (ret): + self.markDone() + self.close() + def markDone(self): pass |
