netgod / rpms / anaconda

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