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 | |
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
-rw-r--r-- | dispatch.py | 10 | ||||
-rwxr-xr-x | gui.py | 6 | ||||
-rw-r--r-- | iw/iw_gui.py | 2 | ||||
-rw-r--r-- | iw/language_gui.py | 1 |
4 files changed, 13 insertions, 6 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(): @@ -503,7 +503,8 @@ class InstallControlWindow: exec s ics = InstallControlState (self) - + ics.setPrevEnabled(self.dispatch.canGoBack()) + self.destroyCurrentWindow() self.currentWindow = newScreenClass(ics) @@ -557,7 +558,6 @@ class InstallControlWindow: self.html.source (ics.getHTML(self.langSearchPath)) - if (ics.getGrabNext ()): nextButton.grab_focus () @@ -745,7 +745,7 @@ class InstallControlState: self.searchPath = [ "./", "/usr/share/anaconda/", "./" ] self.cw = cw self.prevEnabled = 1 - self.nextEnabled = 0 + self.nextEnabled = 1 self.nextButtonInfo = None self.helpButtonEnabled = TRUE self.title = _("Install Window") diff --git a/iw/iw_gui.py b/iw/iw_gui.py index e66bb3d3f..f63820cca 100644 --- a/iw/iw_gui.py +++ b/iw/iw_gui.py @@ -7,8 +7,6 @@ class InstallWindow: def __init__ (self,ics): self.ics = ics - ics.setNextEnabled (1) - ics.setPrevEnabled (1) if self.htmlTag: ics.readHTML (self.htmlTag) diff --git a/iw/language_gui.py b/iw/language_gui.py index 8be5e1912..f0612976b 100644 --- a/iw/language_gui.py +++ b/iw/language_gui.py @@ -9,7 +9,6 @@ class LanguageWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setPrevEnabled(FALSE) def getNext (self): self.instLang.setRuntimeLanguage(self.lang) |