summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-03 14:15:13 +0000
committerMatt Wilson <msw@redhat.com>1999-09-03 14:15:13 +0000
commit5ed2fb154dfe063405d1f4c60cb656c7580da023 (patch)
tree6e3a906fb075791c86643a7e64883dda04299dc7 /gui.py
parent7610b7bbbc0cab742f31a1ea5837ccd7a44565a3 (diff)
downloadanaconda-5ed2fb154dfe063405d1f4c60cb656c7580da023.tar.gz
anaconda-5ed2fb154dfe063405d1f4c60cb656c7580da023.tar.xz
anaconda-5ed2fb154dfe063405d1f4c60cb656c7580da023.zip
read help from html files
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/gui.py b/gui.py
index 6b31e1d95..b02b8ed97 100755
--- a/gui.py
+++ b/gui.py
@@ -304,7 +304,11 @@ class InstallControlWindow (Thread):
self.displayHelp = TRUE
self.helpFrame = GtkFrame (_("Online Help"))
- self.helpFrame.add (self.html)
+ box = GtkVBox (FALSE, 0)
+
+ box.pack_start (GtkHSeparator (), FALSE)
+ box.pack_start (self.html, TRUE)
+ self.helpFrame.add (box)
table = GtkTable (1, 3, TRUE)
table.attach (self.helpFrame, 0, 1, 0, 1)
@@ -347,6 +351,8 @@ class InstallControlState:
def __init__ (self, cw, ii, todo, title = "Install Window",
prevEnabled = 1, nextEnabled = 0, html = ""):
+ self.prefix = '/usr/share/anaconda/'
+ self.locale = 'C'
self.ii = ii
self.cw = cw
self.todo = todo
@@ -390,6 +396,22 @@ class InstallControlState:
return TRUE
return FALSE
+ def readHTML (self, file):
+ text = None
+ try:
+ text = open("%s/help/%s/s1-help-screens-%s.html" %
+ (self.prefix, self.locale, file)).read ()
+ except IOError:
+ try:
+ text = open("%s/help/C/s1-help-screens-%s.html" %
+ (self.prefix, file)).read ()
+ except IOError:
+ print "Unable to read %s help text" % (file,)
+
+ if text:
+ self.html = text
+ self.cw.update (self)
+
def setHTML (self, text):
self.html = text
self.cw.update (self)