diff --git a/usr/lib/python3/dist-packages/webengine/gtk3/_custom_window.py b/usr/lib/python3/dist-packages/webengine/gtk3/_custom_window.py index f756573..86197ba 100644 --- a/usr/lib/python3/dist-packages/webengine/gtk3/_custom_window.py +++ b/usr/lib/python3/dist-packages/webengine/gtk3/_custom_window.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 -import gi, os, json, shutil, hashlib, time, threading +import gi gi.require_version('Gtk', '3.0') gi.require_version("WebKit2", "4.1") -from gi.repository import GObject, Gtk, Gdk, WebKit2, GLib, Gio, GdkPixbuf +from gi.repository import Gtk, WebKit2 def create_same_window(origin, req): diff --git a/usr/lib/python3/dist-packages/webengine/gtk3/_webengine.py b/usr/lib/python3/dist-packages/webengine/gtk3/_webengine.py index f6052d0..1e8be75 100644 --- a/usr/lib/python3/dist-packages/webengine/gtk3/_webengine.py +++ b/usr/lib/python3/dist-packages/webengine/gtk3/_webengine.py @@ -3,7 +3,7 @@ # @date 2023/08/08 14:07:26 -import gi, os, json, shutil, hashlib, time, threading +import gi, os, json, shutil, hashlib gi.require_version('Gtk', '3.0') gi.require_version("WebKit2", "4.1") @@ -54,18 +54,6 @@ def noop(): pass - # 类型js的settimeout的修饰器 -def set_timeout(timeout = 0.5): - def decorator(callback): - def wrapper(*args): - t = threading.Timer(timeout, callback, args=args) - t.start() - return t - return wrapper - - return decorator - - class WebEngine(WebKit2.WebView):