diff options
author | Matt Wilson <msw@redhat.com> | 2001-06-25 21:20:49 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-06-25 21:20:49 +0000 |
commit | b4fa606d648195ab5a47432edc26c1a67d6d3e42 (patch) | |
tree | 58ca2cd2b16a6d7c14f76bab3544204fe3ac9538 /dispatch.py | |
parent | 7bff3f20428d39fbd9ec4b7448bff2b2f2c91e6a (diff) | |
download | anaconda-b4fa606d648195ab5a47432edc26c1a67d6d3e42.tar.gz anaconda-b4fa606d648195ab5a47432edc26c1a67d6d3e42.tar.xz anaconda-b4fa606d648195ab5a47432edc26c1a67d6d3e42.zip |
set the prev button in accordance to if it is possible to go back or not
Diffstat (limited to 'dispatch.py')
-rw-r--r-- | dispatch.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dispatch.py b/dispatch.py index 505c56a63..6499f0824 100644 --- a/dispatch.py +++ b/dispatch.py @@ -109,6 +109,16 @@ class Dispatcher: self.dir = 1 self.moveStep() + def canGoBack(self): + # begin with the step before this one. If all steps are skipped, + # we can not go backwards from this screen + i = self.step - 1 + while i >= self.firstStep: + if not self.skipSteps.has_key(installSteps[i][0]): + return 1 + i = i - 1 + return 0 + def setStepList(self, *steps): # only remove non-permanently skipped steps from our skip list for step, state in self.skipSteps.items(): |