[PATCH] Set spokes' distribution and beta warning only once

Vratislav Podzimek vpodzime at redhat.com
Tue Nov 12 13:09:30 UTC 2013


There's no need to set spoke's distribution text and beta warning everytime it
is about to be shown. We can do it only once when we instantiate the spokes.
That way, spokes' distribution texts and beta warnings may be overriden by e.g.
Initial Setup.

Related: rhbz#1028370
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/hubs/__init__.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index e2efb09..32e6ceb 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -108,9 +108,6 @@ class Hub(GUIObject, common.Hub):
 
         action.refresh()
 
-        action.window.set_beta(self.window.get_beta())
-        action.window.set_property("distribution", distributionText().upper())
-
         action.window.set_transient_for(self.window)
         action.window.show_all()
 
@@ -175,6 +172,8 @@ class Hub(GUIObject, common.Hub):
                 # Create the new spoke and populate its UI with whatever data.
                 # From here on, this Spoke will always exist.
                 spoke = spokeClass(self.data, self.storage, self.payload, self.instclass)
+                spoke.window.set_beta(self.window.get_beta())
+                spoke.window.set_property("distribution", distributionText().upper())
 
                 # If a spoke is not showable, it is unreachable in the UI.  We
                 # might as well get rid of it.
-- 
1.8.4.2



More information about the anaconda-patches mailing list