zengxyz / rpms / anaconda

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