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 > Debian > Debian KDE

 
 
LinkBack Thread Tools
 
Old 01-12-2012, 12:53 PM
Martin Sivak
 
Default Allow the user to change his mind about drive reinitializing

Resolves: rhbz#730959
---
dispatch.py | 2 ++
storage/__init__.py | 15 ++++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/dispatch.py b/dispatch.py
index d098698..1be5989 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -128,6 +128,8 @@ class Dispatcher(object):
def canGoBack(self):
# begin with the step before this one. If all steps are skipped,
# we can not go backwards from this screen
+ if self.step is None:
+ return False
i = self.step - 1
while i >= self.firstStep:
if not self.stepIsDirect(i) and not self.skipSteps.has_key(installSteps[i][0]):
diff --git a/storage/__init__.py b/storage/__init__.py
index 414ca8b..3ad9286 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -103,13 +103,18 @@ def storageInitialize(anaconda):
storage.reset()

if not storage.disks:
+ custom_buttons=[_("_Try again"), _("_Exit installer")]
+ if anaconda.dispatch.canGoBack():
+ custom_buttons = [_("_Back"), _("_Exit installer")]
rc = anaconda.intf.messageWindow(_("No disks found"),
- _("No usable disks have been found."),
- type="custom",
- custom_buttons = [_("Back"), _("_Exit installer")],
- default=0)
+ _("No usable disks have been found."),
+ type="custom",
+ custom_buttons=custom_buttons, default=0)
if rc == 0:
- return DISPATCH_BACK
+ if anaconda.dispatch.canGoBack():
+ return DISPATCH_BACK
+ else:
+ return storageInitialize(anaconda)
sys.exit(1)

# dispatch.py helper function
--
1.7.4.4

_______________________________________________
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 02:53 PM.

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