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