diff options
author | Matt Wilson <msw@redhat.com> | 1999-04-25 20:06:53 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-04-25 20:06:53 +0000 |
commit | 3a44d1f8ea178f88e2e9f540de6cfdcfcbaba001 (patch) | |
tree | ddfc76462ae9d4be2da8c609396c1b9365082c7e /gui.py | |
parent | 785d44bf73ccc1d57d771895cc94112a34857809 (diff) | |
download | anaconda-3a44d1f8ea178f88e2e9f540de6cfdcfcbaba001.tar.gz anaconda-3a44d1f8ea178f88e2e9f540de6cfdcfcbaba001.tar.xz anaconda-3a44d1f8ea178f88e2e9f540de6cfdcfcbaba001.zip |
wee! first taste of python exception handling
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -13,7 +13,7 @@ def WelcomeWindow(): window.connect("destroy", destroy) window.set_border_width(10) window.set_title("Welcome to Red Hat Linux!") - + label = GtkLabel("Welcome to Red Hat Linux!\n\n" "This installation process is outlined in detail in the " "Official Red Hat Linux Installation Guide available from " @@ -26,17 +26,20 @@ def WelcomeWindow(): button = GtkButton("Ok") button.connect("clicked", mainquit) vbox = GtkVBox (FALSE, 10) - vbox.pack_start(label, TRUE, TRUE, 0) - vbox.pack_start(button, FALSE, TRUE, 0) + vbox.pack_start(label, FALSE, FALSE, 0) + vbox.pack_start(button, FALSE, FALSE, 0) hbox = GtkHBox (FALSE, 10) + try: - im = GdkImlib.Image("shadowman-200.png") - except RuntimeError: return + im = GdkImlib.Image("shadowman-200.png") + im.render() + pix = im.make_pixmap() + hbox.pack_start(pix, TRUE, TRUE, 0) + + except: + print "Unable to load shadowman-200.png" - im.render() - pix = im.make_pixmap() - hbox.pack_start(pix, TRUE, TRUE, 0) hbox.pack_start(vbox, TRUE, TRUE, 0) window.add(hbox) @@ -57,4 +60,3 @@ for step in steps.keys(): if steps[step]: steps[step]() mainloop() - |