Ticket #3410: flash_embed.py

File flash_embed.py, 564 bytes (added by manuq, 7 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('Flash 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(
18    'http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html')
19window.add(b)
20b.show()
21
22Gtk.main()