summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorpnfisher <pnfisher>1999-09-20 19:54:11 +0000
committerpnfisher <pnfisher>1999-09-20 19:54:11 +0000
commit603220309b80483b50312b2827e3c3fd9897045e (patch)
tree1027d6ea08411e1bb492adedde4327ebf78680e0 /gui.py
parent35e068eb6c328334daded553e2458a55962439f7 (diff)
downloadanaconda-603220309b80483b50312b2827e3c3fd9897045e.tar.gz
anaconda-603220309b80483b50312b2827e3c3fd9897045e.tar.xz
anaconda-603220309b80483b50312b2827e3c3fd9897045e.zip
No longer call getPrev, and cache all previous states.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py33
1 files changed, 20 insertions, 13 deletions
diff --git a/gui.py b/gui.py
index fd077e505..6736f8594 100755
--- a/gui.py
+++ b/gui.py
@@ -251,20 +251,23 @@ class InstallControlWindow (Thread):
self.stateListIndex = pos
def prevClicked (self, *args):
- prev = self.currentScreen.getPrev ()
- if prev:
- instantiated = 0
- for x in self.windowList:
- if isinstance (x, prev):
- self.currentScreen = x
- instantiated = 1
- break
- if not instantiated:
- self.currentScreen = self.instantiateWindow (prev)
+# prev = self.currentScreen.getPrev ()
+# if prev:
+# instantiated = 0
+# for x in self.windowList:
+# if isinstance (x, prev):
+# self.currentScreen = x
+# instantiated = 1
+# break
+# if not instantiated:
+# self.currentScreen = self.instantiateWindow (prev)
- else:
- self.stateListIndex = self.stateListIndex - 1
- self.currentScreen = self.stateList[self.stateListIndex]
+# else:
+# self.stateListIndex = self.stateListIndex - 1
+# self.currentScreen = self.stateList[self.stateListIndex]
+
+ self.prevList.pop ()
+ (self.currentScreen, self.stateListIndex) = self.prevList[-1]
self.setScreen (self.currentScreen, self.prevClicked)
def nextClicked (self, *args):
@@ -331,6 +334,10 @@ class InstallControlWindow (Thread):
if not self.initialScreenShown:
self.initialScreenShown = 1
screen.getICS ().setPrevEnabled (FALSE)
+ self.prevList = []
+
+ if not direction == self.prevClicked:
+ self.prevList.append ((screen, self.stateListIndex))
if self.helpState != self.displayHelp:
if self.displayHelp: