diff options
Diffstat (limited to 'examples/cairo-demo.py')
-rwxr-xr-x | examples/cairo-demo.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/cairo-demo.py b/examples/cairo-demo.py index 8420c2f..72a0533 100755 --- a/examples/cairo-demo.py +++ b/examples/cairo-demo.py @@ -1,6 +1,8 @@ #!/usr/bin/env python """Based on cairo-demo/X11/cairo-demo.c """ +import pygtk +pygtk.require('2.0') import cairo from gi.repository import Gdk, Gtk @@ -107,7 +109,7 @@ def expose (da, event): def main(): win = Gtk.Window() - win.connect('destroy', Gtk.main_quit) + win.connect('destroy', lambda w: Gtk.main_quit()) win.set_default_size(450, 550) drawingarea = Gtk.DrawingArea() |