From 4ef23a703d2e49803ea6690aa1d6dd29e85eea9b Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 8 Sep 2023 16:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dist-packages/webengine/gtk3/_custom_window.py | 4 ++-- .../dist-packages/webengine/gtk3/_webengine.py | 14 +------------- 2 files changed, 3 insertions(+), 15 deletions(-) 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):