netgod / rpms / anaconda

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