netgod / rpms / anaconda

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