diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-03 14:15:13 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-03 14:15:13 +0000 |
commit | 5ed2fb154dfe063405d1f4c60cb656c7580da023 (patch) | |
tree | 6e3a906fb075791c86643a7e64883dda04299dc7 /gui.py | |
parent | 7610b7bbbc0cab742f31a1ea5837ccd7a44565a3 (diff) | |
download | anaconda-5ed2fb154dfe063405d1f4c60cb656c7580da023.tar.gz anaconda-5ed2fb154dfe063405d1f4c60cb656c7580da023.tar.xz anaconda-5ed2fb154dfe063405d1f4c60cb656c7580da023.zip |
read help from html files
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -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) |