diff options
author | Chris Lumens <clumens@redhat.com> | 2013-02-13 14:34:51 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2013-02-15 10:16:14 -0500 |
commit | 2be7b184fff5ade98ed43b9abc1575ef172d3e82 (patch) | |
tree | 90f5f875e828fae479860590d7bd7a0b971faff7 /pyanaconda/ui | |
parent | dc31eb0c07400dda6c73110e4f45a9250c7b0d41 (diff) | |
download | anaconda-2be7b184fff5ade98ed43b9abc1575ef172d3e82.tar.gz anaconda-2be7b184fff5ade98ed43b9abc1575ef172d3e82.tar.xz anaconda-2be7b184fff5ade98ed43b9abc1575ef172d3e82.zip |
Display storage warnings, similar to how errors are displayed (#909410).
Diffstat (limited to 'pyanaconda/ui')
-rw-r--r-- | pyanaconda/ui/gui/spokes/storage.py | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index bb267541e..f8f7daa60 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -440,6 +440,7 @@ class StorageSpoke(NormalSpoke, StorageChecker): if self.autopart: # this was already run as part of doAutoPartition. dumb. StorageChecker.errors = [] + StorageChecker.warnings = [] self.run() finally: self._ready = True @@ -483,6 +484,8 @@ class StorageSpoke(NormalSpoke, StorageChecker): if self.errors: msg = _("Error checking storage configuration") + elif self.warnings: + msg = _("Warning checking storage configuration") elif self.data.autopart.autopart: msg = _("Automatic partitioning selected") else: @@ -530,6 +533,8 @@ class StorageSpoke(NormalSpoke, StorageChecker): if self.errors: self.set_warning(_("Error checking storage configuration. Click for details.")) + elif self.warnings: + self.set_warning(_("Warning checking storage configuration. Click for details.")) def initialize(self): from pyanaconda.ui.gui.utils import setViewportBackground @@ -808,23 +813,31 @@ class StorageSpoke(NormalSpoke, StorageChecker): print "ADD DISK CLICKED" def on_info_bar_clicked(self, *args): - if not self.errors: - return - - label = _("The following errors were encountered when checking your storage " - "configuration. You can modify your storage layout\nor quit the " - "installer.") - dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Modify Storage Layout")], label=label) - with enlightbox(self.window, dialog.window): - errors = "\n".join(self.errors) - dialog.refresh(errors) - rc = dialog.run() - - dialog.window.destroy() - - if rc == 0: - # Quit. - sys.exit(0) - elif rc == 1: - # Close the dialog so the user can change selections. - pass + if self.errors: + label = _("The following errors were encountered when checking your storage " + "configuration. You can modify your storage layout\nor quit the " + "installer.") + + dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Modify Storage Layout")], label=label) + with enlightbox(self.window, dialog.window): + errors = "\n".join(self.errors) + dialog.refresh(errors) + rc = dialog.run() + + dialog.window.destroy() + + if rc == 0: + # Quit. + sys.exit(0) + elif self.warnings: + label = _("The following warnings were encountered when checking your storage " + "configuration. These are not fatal, but you may wish to make " + "changes to your storage layout.") + + dialog = DetailedErrorDialog(self.data, buttons=[_("_OK")], label=label) + with enlightbox(self.window, dialog.window): + warnings = "\n".join(self.warnings) + dialog.refresh(warnings) + rc = dialog.run() + + dialog.window.destroy() |