[master 5/5] Add links to clickable warning and error messages.
dashea
installerbot-noreply at redhat.com
Wed Mar 4 15:41:20 UTC 2015
From: David Shea <dshea at redhat.com>
This makes clicking on the message difficult but possible to do with a
keyboard.
---
pyanaconda/ui/gui/spokes/custom.py | 32 ++++++++++++++++----------------
pyanaconda/ui/gui/spokes/software.py | 2 +-
pyanaconda/ui/gui/spokes/storage.py | 4 ++--
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index a36312d..f0f4d9a 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -106,10 +106,10 @@
NEW_CONTAINER_TEXT = N_("Create a new %(container_type)s ...")
CONTAINER_TOOLTIP = N_("Create or select %(container_type)s")
-DEVICE_CONFIGURATION_ERROR_MSG = N_("Device reconfiguration failed. Click for "
- "details.")
+DEVICE_CONFIGURATION_ERROR_MSG = N_("Device reconfiguration failed. <a href=\"\">Click for "
+ "details.</a>")
UNRECOVERABLE_ERROR_MSG = N_("Storage configuration reset due to unrecoverable "
- "error. Click for details.")
+ "error. <a href=\"\">Click for details.</a>")
def dev_type_from_const(dev_type_const):
""" Return integer corresponding to name for device type defined as
@@ -773,7 +773,7 @@ def _handle_size_change(self, size, old_size, device):
use_dev.size = use_old_size
self._error = e
self.set_warning(_("Device resize request failed. "
- "Click for details."))
+ "<a href=\"\">Click for details.</a>"))
else:
_changed_size = True
@@ -846,7 +846,7 @@ def _do_reformat(self, device, mountpoint, label, changed_encryption,
device.format = old_format
self._error = e
self.set_warning(_("Device reformat request failed. "
- "Click for details."))
+ "<a href=\"\">Click for details.</a>"))
else:
# first, remove this selector from any old install page(s)
new_selector = None
@@ -1582,9 +1582,9 @@ def _do_check(self):
StorageChecker.checkStorage(self)
if self.errors:
- self.set_warning(_("Error checking storage configuration. Click for details or press Done again to continue."))
+ self.set_warning(_("Error checking storage configuration. <a href=\"\">Click for details</a> or press Done again to continue."))
elif self.warnings:
- self.set_warning(_("Warning checking storage configuration. Click for details or press Done again to continue."))
+ self.set_warning(_("Warning checking storage configuration. <a href=\"\">Click for details</a> or press Done again to continue."))
# on_info_bar_clicked requires self._error to be set, so set it to the
# list of all errors and warnings that storage checking found.
@@ -1701,8 +1701,8 @@ def _add_device(self, dev_info):
if e:
self._error = e
- self.set_error(_("Failed to add new device. Click for "
- "details."))
+ self.set_error(_("Failed to add new device. <a href=\"\">Click for "
+ "details.</a>"))
except OverflowError as e:
log.error("invalid size set for partition")
self._error = e
@@ -1813,8 +1813,8 @@ def _destroy_device(self, device):
except StorageError as e:
log.error("failed to schedule device removal: %s", e)
self._error = e
- self.set_warning(_("Device removal request failed. Click "
- "for details."))
+ self.set_warning(_("Device removal request failed. <a href=\"\">Click "
+ "for details.</a>"))
else:
if is_logical_partition:
self._storage_playground.removeEmptyExtendedPartitions()
@@ -2324,8 +2324,8 @@ def _do_autopart(self):
log.error("doAutoPartition failed: %s", e)
self._reset_storage()
self._error = e
- self.set_error(_("Automatic partitioning failed. Click "
- "for details."))
+ self.set_error(_("Automatic partitioning failed. <a href=\"\">Click "
+ "for details.</a>"))
else:
self._devices = self._storage_playground.devices
# mark all new containers for automatic size management
@@ -2349,8 +2349,8 @@ def _do_autopart(self):
log.error("doAutoPartition failed: %s", messages)
self._reset_storage()
self._error = messages
- self.set_error(_("Automatic partitioning failed. Click "
- "for details."))
+ self.set_error(_("Automatic partitioning failed. <a href=\"\">Click "
+ "for details.</a>"))
def on_create_clicked(self, button, autopartTypeCombo):
# Then do autopartitioning. We do not do any clearpart first. This is
@@ -2657,7 +2657,7 @@ def on_unlock_clicked(self, *args):
device.format.passphrase = None
self._passphraseEntry.set_text("")
self.set_warning(_("Failed to unlock encrypted block device. "
- "Click for details"))
+ "<a href=\"\">Click for details.</a>"))
return
log.info("unlocked %s, now going to populate devicetree...", device.name)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 5006e4c..b862af3 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -361,7 +361,7 @@ def refreshAddons(self):
self._selectFlag = True
if self._errorMsgs:
- self.set_warning(_("Error checking software dependencies. Click for details."))
+ self.set_warning(_("Error checking software dependencies. <a href=\"\">Click for details.</a>"))
else:
self.clear_info()
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 8273dcb..1317017 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -515,9 +515,9 @@ def refresh(self):
self._update_summary()
if self.errors:
- self.set_warning(_("Error checking storage configuration. Click for details."))
+ self.set_warning(_("Error checking storage configuration. <a href=\"\">Click for details.</a>"))
elif self.warnings:
- self.set_warning(_("Warning checking storage configuration. Click for details."))
+ self.set_warning(_("Warning checking storage configuration. <a href=\"\">Click for details.</a>"))
def initialize(self):
NormalSpoke.initialize(self)
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/5645dfc82fc644228924cd7c3e88e02ca5d9b6cc
More information about the anaconda-patches
mailing list