summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorbfox <bfox>2000-12-19 22:54:27 +0000
committerbfox <bfox>2000-12-19 22:54:27 +0000
commite85a076b8f2b297eb295c15a3539effcac1a3310 (patch)
tree798ce586c655a6552989b1a0f65839273705d252 /gui.py
parentb6ce64898f748fd5ff448c8dc2645345e91c1e6e (diff)
downloadanaconda-e85a076b8f2b297eb295c15a3539effcac1a3310.tar.gz
anaconda-e85a076b8f2b297eb295c15a3539effcac1a3310.tar.xz
anaconda-e85a076b8f2b297eb295c15a3539effcac1a3310.zip
Resovled bug #22305 by reading the release notes into memory at the very beginning of the install. This allows the user to view the release notes during package install and if CD #1 has been removed from the drive.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py61
1 files changed, 29 insertions, 32 deletions
diff --git a/gui.py b/gui.py
index 1c8af56e1..86a60ea88 100755
--- a/gui.py
+++ b/gui.py
@@ -494,50 +494,29 @@ class InstallControlWindow:
frame.add(vbox1)
self.textWin.add (frame)
- try:
- self.textWin.set_position (WIN_POS_CENTER)
-
- text = GtkText()
- try:
- file = open("/mnt/source/RELEASE-NOTES", "r")
- for line in file.readlines():
- text.insert(None, None, None, line)
- file.close()
+ self.textWin.set_position (WIN_POS_CENTER)
- except:
- file = open("/RELEASE-NOTES", "r")
- for line in file.readlines():
- text.insert(None, None, None, line)
- file.close()
+
+ if self.buff != "":
+ text = GtkText()
+ text.insert (None, None, None, self.buff)
sw = GtkScrolledWindow()
sw.set_policy(POLICY_NEVER, POLICY_ALWAYS)
sw.add(text)
-
+
vbox1.pack_start(sw, TRUE, TRUE)
-
- try:
- file = open("/mnt/source/RELEASE-NOTES", "r")
- for line in file.readlines():
- text.insert(None, None, None, line)
- file.close()
-
- except:
- file = open("/RELEASE-NOTES", "r")
- for line in file.readlines():
- text.insert(None, None, None, line)
- file.close()
-
+
self.textWin.set_default_size (520, 400)
self.textWin.set_usize (520, 400)
self.textWin.set_position (WIN_POS_CENTER)
-
+
vbox1.pack_start(closeButton, FALSE, FALSE)
-
+
self.textWin.set_border_width(1)
self.textWin.show_all()
- except:
+ else:
self.textWin.set_position (WIN_POS_CENTER)
label = GtkLabel("Unable to load file!")
@@ -547,7 +526,6 @@ class InstallControlWindow:
self.textWin.set_border_width(10)
self.textWin.show_all()
-
def setScreen (self, screen, direction):
# if getScreen returns None, or we're supposed to skip this screen
# entirely, we continue advancing in direction given
@@ -734,6 +712,25 @@ class InstallControlWindow:
except:
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
+
vbox.set_spacing(0)
self.buttonBox = GtkHButtonBox ()