Ticket #3410: java_embed.py

File java_embed.py, 523 bytes (added by manuq, 11 years ago)
Line 
1from gi.repository import WebKit
2from gi.repository import Gtk
3
4def _destroy_cb(widget, data=None):
5    Gtk.main_quit()
6
7window = Gtk.Window()
8window.set_title('Java Embed')
9window.connect("destroy", _destroy_cb)
10window.show()
11
12b = WebKit.WebView()
13s = b.get_settings()
14print "Previous enable-plugins:", s.get_property('enable-plugins')
15s.set_property('enable-plugins', False)
16print "New enable-plugins:", s.get_property('enable-plugins')
17b.load_uri('http://javatester.org/version.html')
18window.add(b)
19b.show()
20
21Gtk.main()