diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pygtk.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/Library/Formula/pygtk.rb b/Library/Formula/pygtk.rb index 7053c68f3..fb8389d45 100644 --- a/Library/Formula/pygtk.rb +++ b/Library/Formula/pygtk.rb @@ -29,46 +29,4 @@ class Pygtk < Formula # pygtk-cellar there is no pygobject. inreplace lib/'pkgconfig/pygtk-2.0.pc', 'codegendir=${datadir}/pygobject/2.0/codegen', "codegendir=#{HOMEBREW_PREFIX}/share/pygobject/2.0/codegen" end - - test do - (testpath/'test.py').write <<-EOS.undent - #!/usr/bin/env python - import pygtk - pygtk.require('2.0') - import gtk - - class HelloWorld(object): - def hello(self, widget, data=None): - print "Hello World" - - def delete_event(self, widget, event, data=None): - print "delete event occurred" - return False - - def destroy(self, widget, data=None): - print "destroy signal occurred" - gtk.main_quit() - - def __init__(self): - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.connect("delete_event", self.delete_event) - self.window.connect("destroy", self.destroy) - self.window.set_border_width(10) - self.button = gtk.Button("Hello World") - self.button.connect("clicked", self.hello, None) - self.button.connect_object("clicked", gtk.Widget.destroy, self.window) - self.window.add(self.button) - self.button.show() - self.window.show() - - def main(self): - gtk.main() - - if __name__ == "__main__": - hello = HelloWorld() - hello.main() - EOS - chmod 0755, 'test.py' - system "./test.py" - end end |
