examples/04_webkit.rb in gir_ffi-gtk-0.7.1 vs examples/04_webkit.rb in gir_ffi-gtk-0.7.2
- old
+ new
@@ -1,7 +1,8 @@
+#!/usr/bin/env ruby
+#
# Based on http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'gir_ffi-gtk3'
GirFFI.setup :WebKit, '3.0'
Gtk.init
@@ -9,7 +10,7 @@
win = Gtk::Window.new :toplevel
wv = WebKit::WebView.new
win.add(wv)
win.show_all
wv.open('http://www.google.com/')
-GObject.signal_connect(win, "destroy") { Gtk.main_quit }
+win.signal_connect("destroy") { Gtk.main_quit }
Gtk.main