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