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 > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-28-2010, 02:37 PM
Chris Lumens
 
Default Make sure we can go back to a previous step before doing so (#537889).

---
dispatch.py | 3 +++
text.py | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dispatch.py b/dispatch.py
index 8c86677..e330b35 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -119,6 +119,9 @@ installSteps = [
class Dispatcher:

def gotoPrev(self):
+ """
+ You should make sure canGoBack() returns True before attempting gotoPrev().
+ """
self._setDir(DISPATCH_BACK)
self.moveStep()

diff --git a/text.py b/text.py
index 40093c6..76abc4c 100644
--- a/text.py
+++ b/text.py
@@ -715,14 +715,15 @@ class InstallInterface:

lastrc = rc

- if step == -1:
- if not anaconda.dispatch.canGoBack():
+ if step == -1:
+ if anaconda.dispatch.canGoBack():
+ anaconda.dispatch.gotoPrev()
+ else:
ButtonChoiceWindow(self.screen, _("Cancelled"),
_("I can't go to the previous step "
"from here. You will have to try "
"again."),
buttons=[_("OK")])
- anaconda.dispatch.gotoPrev()
else:
anaconda.dispatch.gotoNext()

--
1.7.1.1

_______________________________________________
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 01:09 PM.

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