1 | from gi.repository import WebKit |
---|
2 | from gi.repository import Gtk |
---|
3 | |
---|
4 | def _destroy_cb(widget, data=None): |
---|
5 | Gtk.main_quit() |
---|
6 | |
---|
7 | window = Gtk.Window() |
---|
8 | window.set_title('Flash Embed') |
---|
9 | window.connect("destroy", _destroy_cb) |
---|
10 | window.show() |
---|
11 | |
---|
12 | b = WebKit.WebView() |
---|
13 | s = b.get_settings() |
---|
14 | print "Previous enable-plugins:", s.get_property('enable-plugins') |
---|
15 | s.set_property('enable-plugins', False) |
---|
16 | print "New enable-plugins:", s.get_property('enable-plugins') |
---|
17 | b.load_uri( |
---|
18 | 'http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html') |
---|
19 | window.add(b) |
---|
20 | b.show() |
---|
21 | |
---|
22 | Gtk.main() |
---|