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