12 # to Qt. |
12 # to Qt. |
13 # |
13 # |
14 # https://github.com/afilipovich/gglsbl |
14 # https://github.com/afilipovich/gglsbl |
15 # |
15 # |
16 |
16 |
|
17 import base64 |
17 import os |
18 import os |
18 import base64 |
|
19 |
19 |
20 from PyQt6.QtCore import ( |
20 from PyQt6.QtCore import ( |
|
21 QCoreApplication, |
|
22 QDateTime, |
|
23 QObject, |
|
24 QTimer, |
|
25 QUrl, |
21 pyqtSignal, |
26 pyqtSignal, |
22 pyqtSlot, |
27 pyqtSlot, |
23 QObject, |
|
24 QCoreApplication, |
|
25 QUrl, |
|
26 QDateTime, |
|
27 QTimer, |
|
28 ) |
28 ) |
29 |
29 |
30 from eric7 import Preferences, Utilities |
30 from eric7 import Preferences, Utilities |
31 |
|
32 from eric7.EricGui import EricPixmapCache |
31 from eric7.EricGui import EricPixmapCache |
33 from eric7.UI.NotificationWidget import NotificationTypes |
32 from eric7.UI.NotificationWidget import NotificationTypes |
34 |
33 |
35 from .SafeBrowsingAPIClient import SafeBrowsingAPIClient |
34 from .SafeBrowsingAPIClient import SafeBrowsingAPIClient |
36 from .SafeBrowsingCache import SafeBrowsingCache |
35 from .SafeBrowsingCache import SafeBrowsingCache |
37 from .SafeBrowsingThreatList import ThreatList, HashPrefixList |
36 from .SafeBrowsingThreatList import HashPrefixList, ThreatList |
38 from .SafeBrowsingUrl import SafeBrowsingUrl |
37 from .SafeBrowsingUrl import SafeBrowsingUrl |
39 |
38 |
40 |
39 |
41 class SafeBrowsingManager(QObject): |
40 class SafeBrowsingManager(QObject): |
42 """ |
41 """ |
369 """ |
368 """ |
370 Public slot to show the safe browsing management dialog. |
369 Public slot to show the safe browsing management dialog. |
371 """ |
370 """ |
372 if self.__gsbDialog is None: |
371 if self.__gsbDialog is None: |
373 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
372 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
|
373 |
374 from .SafeBrowsingDialog import SafeBrowsingDialog |
374 from .SafeBrowsingDialog import SafeBrowsingDialog |
375 |
375 |
376 self.__gsbDialog = SafeBrowsingDialog( |
376 self.__gsbDialog = SafeBrowsingDialog( |
377 self, parent=WebBrowserWindow.mainWindow() |
377 self, parent=WebBrowserWindow.mainWindow() |
378 ) |
378 ) |