[master 2/2] Only set the hub message if the message has changed
dashea
installerbot-noreply at redhat.com
Wed Mar 4 15:26:17 UTC 2015
From: David Shea <dshea at redhat.com>
Animating the info bar show and hide events suddenly made the sequence
of "Please complete items..." warnings really noticeable.
---
pyanaconda/ui/gui/hubs/__init__.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 30769ec..c9977a0 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -88,6 +88,7 @@ def __init__(self, data, storage, payload, instclass):
self._inSpoke = False
self._notReadySpokes = []
self._spokes = {}
+ self._warningMsg = None
self._checker = None
@@ -216,14 +217,18 @@ def _handleCompleteness(self, spoke, update_continue=True):
self._updateContinue()
def _updateContinue(self):
- self.clear_info()
if len(self._incompleteSpokes) == 0:
if self._checker and not self._checker.check():
- self.set_warning(self._checker.error_message)
+ warning = self._checker.error_message
else:
- msg = _("Please complete items marked with this icon before continuing to the next step.")
-
- self.set_warning(msg)
+ warning = _("Please complete items marked with this icon before continuing to the next step.")
+
+ # Check that this warning isn't already set to avoid spamming the
+ # info bar with incomplete spoke messages when the hub starts
+ if warning != self._warningMsg:
+ self.clear_info()
+ self.set_warning(warning)
+ self._warningMsg = warning
self._updateContinueButton()
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/4793c77707d0cfc0a7a39218d5fc4862608bf328
More information about the anaconda-patches
mailing list