[initial-setup][rhel7-branch][PATCH] Fix Initial Setup to correctly support the Anaconda built-in Help (#1072033)

Martin Kolman mkolman at redhat.com
Thu Oct 2 15:31:17 UTC 2014


There are a couple of small Initial Setup specific tweaks that need to be
applied to make the help system work as well as in Anaconda:
* add yelp dependency for the Initial Setup GUI package
* add a post-install-class providing hosting the help paths
* add help file names for the Initial Setup hub and EULA spoke

Related: rhbz#1072033
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 initial-setup.spec                          |  1 +
 initial_setup/__main__.py                   |  3 ++-
 initial_setup/gui/hubs/initial_setup_hub.py |  1 +
 initial_setup/gui/spokes/eula.py            |  1 +
 initial_setup/post_installclass.py          | 27 +++++++++++++++++++++++++++
 5 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 initial_setup/post_installclass.py

diff --git a/initial-setup.spec b/initial-setup.spec
index 0e57df1..fad3c26 100644
--- a/initial-setup.spec
+++ b/initial-setup.spec
@@ -48,6 +48,7 @@ a series of steps that allows for easier configuration of the machine.
 Summary: Graphical user interface for the initial-setup utility
 Requires: gtk3
 Requires: anaconda-gui >= %{anacondaver}
+Requires: yelp
 
 %description gui
 The initial-setup-gui package contains a graphical user interface for the
diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py
index 429008a..4b07386 100644
--- a/initial_setup/__main__.py
+++ b/initial_setup/__main__.py
@@ -4,6 +4,7 @@ import sys
 import signal
 import pykickstart
 from pyanaconda.users import Users
+from initial_setup.post_installclass import InstallClass
 
 signal.signal(signal.SIGINT, signal.SIG_IGN)
 
@@ -91,7 +92,7 @@ if mode == "gui":
     gui.InitialSetupGraphicalUserInterface.update_paths(addon_module_paths)
 
     # Initialize the UI
-    ui = gui.InitialSetupGraphicalUserInterface(None, None, None)
+    ui = gui.InitialSetupGraphicalUserInterface(None, None, InstallClass())
 else:
     # Import IS gui specifics
     import tui
diff --git a/initial_setup/gui/hubs/initial_setup_hub.py b/initial_setup/gui/hubs/initial_setup_hub.py
index 690c4ae..24b9edd 100644
--- a/initial_setup/gui/hubs/initial_setup_hub.py
+++ b/initial_setup/gui/hubs/initial_setup_hub.py
@@ -32,6 +32,7 @@ class InitialSetupMainHub(Hub):
     builderObjects = ["summaryWindow"]
     mainWidgetName = "summaryWindow"
     translationDomain = "initial-setup"
+    helpFile = "InitialSetupHub.xml"
 
     def __init__(self, *args):
         Hub.__init__(self, *args)
diff --git a/initial_setup/gui/spokes/eula.py b/initial_setup/gui/spokes/eula.py
index 415eff1..ed3b521 100644
--- a/initial_setup/gui/spokes/eula.py
+++ b/initial_setup/gui/spokes/eula.py
@@ -21,6 +21,7 @@ class EULAspoke(FirstbootOnlySpokeMixIn, NormalSpoke):
     builderObjects = ["eulaBuffer", "eulaWindow"]
     mainWidgetName = "eulaWindow"
     uiFile = "eula.glade"
+    helpFile = "EULAspoke.xml"
 
     icon = "application-certificate-symbolic"
     title = N_("_LICENSE INFORMATION")
diff --git a/initial_setup/post_installclass.py b/initial_setup/post_installclass.py
new file mode 100644
index 0000000..8745dcc
--- /dev/null
+++ b/initial_setup/post_installclass.py
@@ -0,0 +1,27 @@
+#
+# Simple post-install class
+#
+# Copyright (C) 2014  Red Hat, Inc.  All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from pyanaconda.installclass import BaseInstallClass
+
+class InstallClass(BaseInstallClass):
+    help_placeholder = "RHEL7Placeholder.html"
+    help_placeholder_with_links = "RHEL7PlaceholderWithLinks.html"
+
+    def __init__(self):
+        BaseInstallClass.__init__(self)
-- 
1.9.3



More information about the anaconda-patches mailing list