Create WebView without WebContext, as it has assigned one anyways
This commit is contained in:
parent
939d0cfb53
commit
2ebbdcbae2
|
@ -8,10 +8,9 @@ gi.require_version("Gtk","3.0")
|
|||
gi.require_version("WebKit2","4.0")
|
||||
from gi.repository import Gtk,WebKit2
|
||||
|
||||
webContext = WebKit2.WebContext()
|
||||
|
||||
def createWebView(*args,**kwargs):
|
||||
return WebKit2.WebView.new_with_context(webContext,*args,**kwargs)
|
||||
webView = WebKit2.WebView.new()
|
||||
return webView
|
||||
|
||||
def init():
|
||||
global event
|
||||
|
|
|
@ -18,9 +18,8 @@ def onFavicon(webView,_):
|
|||
favicon = Gdk.pixbuf_get_from_surface(favicon,0,0,favicon.get_width(),favicon.get_height())
|
||||
window.set_icon(favicon)
|
||||
|
||||
mfp.require("browser").webContext.set_favicon_database_directory(None)
|
||||
|
||||
def onWebviewCreated(webView):
|
||||
onFavicon(webView,None)
|
||||
webView.props.web_context.set_favicon_database_directory(None)
|
||||
webView.connect("notify::favicon",onFavicon)
|
||||
eventHandler["webview:created"] = onWebviewCreated
|
Loading…
Reference in New Issue