Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 372 → Rev 373

/branches/BR-0.4/basico/widgets/wdg_browser.py
24,8 → 24,7
 
 
from basico.core.mod_wdg import BasicoWidget
 
 
class BasicoBrowser(BasicoWidget, Gtk.VBox):
def __init__(self, app):
# ~ def __init__(self, *args, **kwargs):
37,10 → 36,12
self.log.debug("Using WebKit2 (4.0)")
else:
self.log.debug("Using WebKit (3.0)")
self.webview = WebKit.WebView()
 
settings = self.webview.get_settings()
if WEBKIT_RELEASE == 3:
settings = self.webview.get_settings()
settings.set_property('enable-developer-extras', False)
settings.set_property('enable-default-context-menu', True)
settings.set_property('default-encoding', 'utf-8')
52,8 → 53,20
 
# scale other content besides from text as well
self.webview.set_full_content_zoom(True)
else:
settings.set_property('enable-smooth-scrolling', True)
settings.set_property('enable-plugins', False)
settings.set_property('enable-fullscreen', False)
settings.set_property('enable-html5-database', False)
settings.set_property('enable-html5-local-storage', False)
settings.set_property('enable-media-stream', False)
settings.set_property('enable-mediasource', False)
settings.set_property('enable-offline-web-application-cache', True)
settings.set_property('enable-page-cache', True)
settings.set_property('enable-webaudio', False)
settings.set_property('enable-webgl', False)
 
self.show()
# ~ self.show()
scrolled_window = Gtk.ScrolledWindow()
scrolled_window.add(self.webview)
scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
61,7 → 74,7
scrolled_window.set_hexpand(True)
scrolled_window.set_vexpand(True)
self.pack_start(scrolled_window, True, True, 0)
scrolled_window.show_all()
# ~ scrolled_window.show_all()
 
 
def load_url(self, url):