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

Martin Kolman mkolman at redhat.com
Thu Oct 9 15:00:28 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 a post-install-class providing hosting for the help paths
* add help file names for the Initial Setup hub

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

diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py
index 878169f..807a51b 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 PostInstallClass
 from pyanaconda import iutil
 
 # set root to "/", we are now in the installed system
@@ -86,7 +87,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, PostInstallClass())
 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 ec7fc75..0fb6cb4 100644
--- a/initial_setup/gui/hubs/initial_setup_hub.py
+++ b/initial_setup/gui/hubs/initial_setup_hub.py
@@ -12,6 +12,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/post_installclass.py b/initial_setup/post_installclass.py
new file mode 100644
index 0000000..3bd5a45
--- /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 PostInstallClass(BaseInstallClass):
+    help_placeholder = "FedoraPlaceholder.html"
+    help_placeholder_with_links = "FedoraPlaceholderWithLinks.html"
+
+    def __init__(self):
+        BaseInstallClass.__init__(self)
-- 
1.9.3



More information about the anaconda-patches mailing list