7a2bab
From c29802a2be591a4cdcc91ba86b74fc4d01087b72 Mon Sep 17 00:00:00 2001
7a2bab
From: Martin Kolman <mkolman@redhat.com>
7a2bab
Date: Fri, 11 Sep 2020 15:27:59 +0200
7a2bab
Subject: [PATCH] Fix CDN button visibility
7a2bab
7a2bab
Only show the Red Hat CDN button if the Subscription
7a2bab
module appears to be running. To achieve that, we do
7a2bab
the same thing as with the HMC button - the CDN
7a2bab
button invisible by default. And enable it only if it
7a2bab
looks like the Subscription module is running.
7a2bab
7a2bab
(cherry picked from commit: aca297587ab8bdd7342fa056273bfff379bc0a0b)
7a2bab
7a2bab
Resolves: rhbz#1903178
7a2bab
---
7a2bab
 pyanaconda/ui/gui/spokes/installation_source.glade | 2 +-
7a2bab
 pyanaconda/ui/gui/spokes/installation_source.py    | 4 ++--
7a2bab
 2 files changed, 3 insertions(+), 3 deletions(-)
7a2bab
7a2bab
diff --git a/pyanaconda/ui/gui/spokes/installation_source.glade b/pyanaconda/ui/gui/spokes/installation_source.glade
7a2bab
index a23f8be714..e53fa230ca 100644
7a2bab
--- a/pyanaconda/ui/gui/spokes/installation_source.glade
7a2bab
+++ b/pyanaconda/ui/gui/spokes/installation_source.glade
7a2bab
@@ -633,9 +633,9 @@
7a2bab
                             <child>
7a2bab
                               <object class="GtkRadioButton" id="cdnRadioButton">
7a2bab
                                 <property name="label" translatable="yes" context="GUI|Software Source">Red Hat _CDN</property>
7a2bab
-                                <property name="visible">True</property>
7a2bab
                                 <property name="can_focus">True</property>
7a2bab
                                 <property name="receives_default">False</property>
7a2bab
+                                <property name="no_show_all">True</property>
7a2bab
                                 <property name="margin_left">12</property>
7a2bab
                                 <property name="use_underline">True</property>
7a2bab
                                 <property name="xalign">0</property>
7a2bab
diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py
7a2bab
index 6aab9b387a..d0d4da72b9 100644
7a2bab
--- a/pyanaconda/ui/gui/spokes/installation_source.py
7a2bab
+++ b/pyanaconda/ui/gui/spokes/installation_source.py
7a2bab
@@ -854,9 +854,9 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler):
7a2bab
     def _initialize(self):
7a2bab
         threadMgr.wait(constants.THREAD_PAYLOAD)
7a2bab
 
7a2bab
-        # If there is no Subscriptiopn DBus module, disable the CDN radio button
7a2bab
+        # If there is the Subscriptiopn DBus module, make the CDN radio button visible
7a2bab
         if is_module_available(SUBSCRIPTION):
7a2bab
-            gtk_call_once(self._cdn_button.set_no_show_all, True)
7a2bab
+            gtk_call_once(self._cdn_button.set_no_show_all, False)
7a2bab
 
7a2bab
         # Get the current source.
7a2bab
         source_proxy = self.payload.get_source_proxy()
7a2bab
-- 
7a2bab
2.29.2
7a2bab