summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorbfox <bfox>2000-11-13 22:08:01 +0000
committerbfox <bfox>2000-11-13 22:08:01 +0000
commitf8826ab3ff8e1449f919076006d01046c7da1108 (patch)
treef8a92194f0a5505a37cf46ad5651684ed1e9d8a3 /gui.py
parent64a272c1cbdc17901ae77e8552f3bd5c046de3f9 (diff)
downloadanaconda-f8826ab3ff8e1449f919076006d01046c7da1108.tar.gz
anaconda-f8826ab3ff8e1449f919076006d01046c7da1108.tar.xz
anaconda-f8826ab3ff8e1449f919076006d01046c7da1108.zip
Added some code to handle the situation if the RELEASE-NOTES file isn't present, then clicking the button to view them doesn't traceback.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py82
1 files changed, 53 insertions, 29 deletions
diff --git a/gui.py b/gui.py
index ad6d40a9e..67c54d18b 100755
--- a/gui.py
+++ b/gui.py
@@ -458,51 +458,68 @@ class InstallControlWindow:
self.displayHelp = TRUE
def releaseClicked (self, widget):
-
self.textWin = GtkWindow()
+ closeButton = GtkButton("Close")
+ closeButton.connect("clicked", self.textWin.hide)
+ vbox1 = GtkVBox()
+ self.textWin.add(vbox1)
- self.textWin.set_default_size (520, 400)
- self.textWin.set_usize (520, 400)
- self.textWin.set_position (WIN_POS_CENTER)
+ try:
+# self.textWin.set_default_size (520, 400)
+# self.textWin.set_usize (520, 400)
+ self.textWin.set_position (WIN_POS_CENTER)
- text = GtkText()
-
- sw = GtkScrolledWindow()
- sw.set_policy(POLICY_NEVER, POLICY_ALWAYS)
- sw.add(text)
+ text = GtkText()
+ try:
+ file = open("/mnt/source/RELEASE-NOTES", "r")
+ for line in file.readlines():
+ text.insert(None, None, None, line)
+ file.close()
- vbox1 = GtkVBox()
- vbox1.pack_start(sw, TRUE, TRUE)
+ except:
+ file = open("/RELEASE-NOTES", "r")
+ for line in file.readlines():
+ text.insert(None, None, None, line)
+ file.close()
+
+ sw = GtkScrolledWindow()
+ sw.set_policy(POLICY_NEVER, POLICY_ALWAYS)
+ sw.add(text)
- try:
- file = open("/mnt/source/RELEASE-NOTES", "r")
- for line in file.readlines():
- text.insert(None, None, None, line)
- file.close()
+# vbox1 = GtkVBox()
+ vbox1.pack_start(sw, TRUE, TRUE)
- except:
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()
- except:
- print "Unable to load", file
+ 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)
-# for line in file.readlines():
-# text.insert(None, None, None, line)
-# file.close()
+ self.textWin.set_border_width(10)
+ self.textWin.show_all()
- self.textWin.add(vbox1)
-
- closeButton = GtkButton("Close")
- closeButton.connect("clicked", self.textWin.hide)
- vbox1.pack_start(closeButton, FALSE, FALSE)
+ except:
+# print "Unable to load file"
+ self.textWin.set_position (WIN_POS_CENTER)
+ label = GtkLabel("Unable to load file!")
- self.textWin.show_all()
+ vbox1.pack_start(label, FALSE, FALSE)
+ vbox1.pack_start(closeButton, FALSE, FALSE)
+ self.textWin.set_border_width(10)
+ self.textWin.show_all()
def setScreen (self, screen, direction):
@@ -669,7 +686,14 @@ class InstallControlWindow:
# im = GdkImlib.Image ("pixmaps/first.png")
except:
- print "Unable to load", file
+ try:
+ pix, msk = create_pixmap_from_xpm(self.window, None, "/tmp/updates/anaconda_header.xpm")
+ pixmap = GtkPixmap(pix, msk)
+ pixmap.show()
+ vbox.pack_start(pixmap, FALSE, TRUE, 0)
+
+ except:
+ print "Unable to load", file
vbox.set_spacing(0)