FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 01-28-2010, 04:38 PM
Hans de Goede
 
Default Allow getScreen methods to indicate the screen should be skipped.

Ack.

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(-)

diff --git a/gui.py b/gui.py
index 69559b9..4de661a 100755
--- a/gui.py
+++ b/gui.py
@@ -1352,7 +1352,7 @@ class InstallControlWindow:
(file, className) = stepToClass[step]
newScreenClass = None

- while 1:
+ while True:
try:
found = imputil.imp.find_module(file)
loaded = imputil.imp.load_module(className, found[0], found[1],
@@ -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:
- return
+ if self.anaconda.dispatch.dir == DISPATCH_FORWARD:
+ self.anaconda.dispatch.gotoNext()
+ else:
+ self.anaconda.dispatch.gotoPrev()
+
+ return self.setScreen()

self.update (ics)



_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 03:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org