Allow getScreen methods to indicate the screen should be skipped.
On 01/28/2010 05:54 PM, Chris Lumens wrote:
This is sometimes useful, like when we won't know until the screen is being
populated whether or not we actually want to display it.
gui.py | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
- while 1:
+ while True:
found = imputil.imp.find_module(file)
loaded = imputil.imp.load_module(className, found, found,
@@ -1386,8 +1386,18 @@ class InstallControlWindow:
self.currentWindow = newScreenClass(ics)
new_screen = self.currentWindow.getScreen(anaconda)
+ # If the getScreen method returned None, that means the screen did not
+ # want to be displayed for some reason and we should skip to the next
+ # step. However, we do not want to remove the current step from the
+ # list as later events may cause the screen to be displayed.
if not new_screen:
+ if self.anaconda.dispatch.dir == DISPATCH_FORWARD:
+ return self.setScreen()
Anaconda-devel-list mailing list