netgod / rpms / anaconda

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