diff options
author | Erik Troan <ewt@redhat.com> | 2001-01-25 06:12:58 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-01-25 06:12:58 +0000 |
commit | 5791e21a626ba4335b6324fa74eff861b9e64d8b (patch) | |
tree | 655a55133618cb9d8fca07cbc2c17c2f2566e59d | |
parent | 418b384f38f401282172c5c80ac529a8982d66b1 (diff) | |
download | anaconda-5791e21a626ba4335b6324fa74eff861b9e64d8b.tar.gz anaconda-5791e21a626ba4335b6324fa74eff861b9e64d8b.tar.xz anaconda-5791e21a626ba4335b6324fa74eff861b9e64d8b.zip |
find alternate language release notes
-rwxr-xr-x | gui.py | 35 | ||||
-rw-r--r-- | iw/language_gui.py | 27 |
2 files changed, 18 insertions, 44 deletions
@@ -413,6 +413,7 @@ class InstallControlWindow: label.set_text (text) self.helpFrame.set_label (_("Online Help")) self.installFrame.set_label (_("Language Selection")) + self.loadReleaseNotes() def instantiateWindow (self, windowClass): ics = InstallControlState (self, self.ii, self.todo) @@ -558,6 +559,22 @@ class InstallControlWindow: self.textWin.set_border_width(0) self.textWin.show_all() + def loadReleaseNotes(self): + self.buff = "" + langList = self.todo.instTimeLanguage.getCurrentLangSearchList() + langList = langList + [ "" ] + for lang in langList: + fn = "/mnt/source/RELEASE-NOTES" + if len(lang): + fn = fn + "." + lang + + if os.access(fn, os.R_OK): + file = open(fn, "r") + self.buff = string.join(file.readlines(), '') + file.close() + return + + self.buff = "Release notes are missing.\n" def setScreen (self, screen, direction): # if getScreen returns None, or we're supposed to skip this screen @@ -743,23 +760,7 @@ class InstallControlWindow: print "Unable to load anaconda_header.png" - #--Go ahead and pull the release notes into memory. This allows them to be viewed - #--during package installation - self.buff = "" - try: - file = open("/mnt/source/RELEASE-NOTES", "r") - for line in file.readlines(): - self.buff = self.buff + line - file.close() - - except: - try: - file = open("/RELEASE-NOTES", "r") - for line in file.readlines(): - self.buff = self.buff + line - file.close() - except: - pass + self.loadReleaseNotes() vbox.set_spacing(0) diff --git a/iw/language_gui.py b/iw/language_gui.py index f19209b48..c5e879caa 100644 --- a/iw/language_gui.py +++ b/iw/language_gui.py @@ -26,33 +26,6 @@ class LanguageWindow (InstallWindow): if self.lang: self.icw.setLanguage (self.lang) - #--Go ahead and pull the release notes into memory. This allows them to be viewed - #--during package installation - self.icw.buff = "" - try: - filename = "/mnt/source/RELEASE-NOTES." + self.languages[self.lang] - file = open(filename, "r") - for line in file.readlines(): - self.icw.buff = self.icw.buff + line - file.close() - - except: - try: - filename = "/RELEASE-NOTES." + self.languages[self.lang] - file = open(filename, "r") - for line in file.readlines(): - self.icw.buff = self.icw.buff + line - file.close() - except: - try: - filename = "/RELEASE-NOTES" - file = open(filename, "r") - for line in file.readlines(): - self.icw.buff = self.icw.buff + line - file.close() - except: - pass - return None def select_row (self, clist, row, col, event): |