summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-03-01 00:57:40 +0000
committerJeremy Katz <katzj@redhat.com>2002-03-01 00:57:40 +0000
commit9f6ec0cef971c785feeab0a446345027376f40a4 (patch)
treedbe31206a6bcf546844ff18e4d7a09040ef34973
parented6af67530adfa19b2d7d4f587e3a7c5c7ddaa9b (diff)
downloadanaconda-9f6ec0cef971c785feeab0a446345027376f40a4.tar.gz
anaconda-9f6ec0cef971c785feeab0a446345027376f40a4.tar.xz
anaconda-9f6ec0cef971c785feeab0a446345027376f40a4.zip
merge help tag, architecture support from hampton branch
-rwxr-xr-xgui.py26
-rw-r--r--text.py37
2 files changed, 44 insertions, 19 deletions
diff --git a/gui.py b/gui.py
index d03b64400..98b09f188 100755
--- a/gui.py
+++ b/gui.py
@@ -987,16 +987,28 @@ class InstallControlState:
text = None
if self.htmlFile:
file = self.htmlFile
+
+ if self.cw.configFileData.has_key("helptag"):
+ helpTag = "-%s" % (self.cw.configFileData["helptag"],)
+ else:
+ helpTag = ""
+
+ arch = "-%s" % (iutil.getArch(),)
+ tags = [ "%s%s" % (helpTag, arch), "%s" % (helpTag,),
+ "%s" % (arch,), "" ]
for path in self.searchPath:
for lang in langPath + ['C']:
- try:
- text = open("%s/help/%s/s1-help-screens-%s.html" %
- (path, lang, file)).read ()
- except IOError:
- continue
- else:
- break
+ for tag in tags:
+ try:
+ text = open("%s/help/%s/s1-help-screens-%s%s.html"
+ % (path, lang, file, tag)).read ()
+ except IOError:
+ continue
+ else:
+ break
+ if text:
+ break
if text:
return text
diff --git a/text.py b/text.py
index b29498c32..ff22f5ece 100644
--- a/text.py
+++ b/text.py
@@ -157,22 +157,34 @@ class InstallInterface:
try:
f = None
+ if self.configFileData.has_key("helptag"):
+ helpTag = "-%s" % (self.cw.configFileData["helptag"],)
+ else:
+ helpTag = ""
+ arch = "-%s" % (iutil.getArch(),)
+ tags = [ "%s%s" % (helpTag, arch), "%s" % (helpTag,),
+ "%s" % (arch,), "" ]
+
# XXX
#
# HelpWindow can't get to the langauge
- for lang in self.langSearchPath:
- fn = "/usr/share/anaconda/help/%s/s1-help-screens-%s.txt" \
- % (lang, key)
-# uncomment to test help text installed in local directory instead
-# fn = "./text-help/%s/s1-help-screens-%s.txt" % (lang, key)
-
- try:
- f = open(fn)
- except IOError, msg:
- continue
- break
-
+ found = 0
+ for path in [ "./text-", "/usr/share/anaconda/" ]:
+ if found:
+ break
+ for lang in self.langSearchPath:
+ for tag in tags:
+ fn = "%shelp/%s/s1-help-screens-%s%s.txt" \
+ % (path, lang, key, tag)
+
+ try:
+ f = open(fn)
+ except IOError, msg:
+ continue
+ found = 1
+ break
+
if not f:
ButtonChoiceWindow(screen, _("Help not available"),
_("No help is available for this "
@@ -323,6 +335,7 @@ class InstallInterface:
def run(self, id, dispatch, configFileData):
self.screen = SnackScreen()
+ self.configFileData = configFileData
self.screen.helpCallback(self.helpWindow)
self.drawFrame()