summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2011-08-22 07:58:25 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2011-08-24 19:02:41 +0200
commit7fe10a5b33148b1f029f3d34f76b7f880c1c2e7a (patch)
tree0c5aa71957560bb4442b27d0b9f6359ccaeec093 /demos
parent62fda288c1c37167c589e8e9d49ed625f770a98a (diff)
downloadpygobject-7fe10a5b33148b1f029f3d34f76b7f880c1c2e7a.tar.gz
[gtk-demo] appwindow.py: fix logo loading
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/demos/appwindow.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/demos/gtk-demo/demos/appwindow.py b/demos/gtk-demo/demos/appwindow.py
index 1ab7c518..b39751d5 100644
--- a/demos/gtk-demo/demos/appwindow.py
+++ b/demos/gtk-demo/demos/appwindow.py
@@ -115,13 +115,9 @@ License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
"""
- filename = os.path.join('data', 'gtk-logo-rgb.gif')
- try:
- pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename)
- except GLib.GError:
- filename = os.path.join('demos', filename)
- pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename)
-
+ dirname = os.path.abspath(os.path.dirname(__file__))
+ filename = os.path.join(dirname, 'data', 'gtk-logo-rgb.gif')
+ pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename)
transparent = pixbuf.add_alpha(True, 0xff, 0xff, 0xff)
# FIXME: override Gtk.show_about_dialog
# make about dailog constructor take a parent argument