eric7/WebBrowser/WebBrowserPage.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8354
12ebd3934fef
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
27 from PyQt6.QtNetwork import QSslConfiguration, QSslCertificate 27 from PyQt6.QtNetwork import QSslConfiguration, QSslCertificate
28 SSL_AVAILABLE = True 28 SSL_AVAILABLE = True
29 except ImportError: 29 except ImportError:
30 SSL_AVAILABLE = False 30 SSL_AVAILABLE = False
31 31
32 from E5Gui import E5MessageBox 32 from E5Gui import EricMessageBox
33 33
34 from WebBrowser.WebBrowserWindow import WebBrowserWindow 34 from WebBrowser.WebBrowserWindow import WebBrowserWindow
35 35
36 from .JavaScript.ExternalJsObject import ExternalJsObject 36 from .JavaScript.ExternalJsObject import ExternalJsObject
37 37
180 if threatLists: 180 if threatLists:
181 threatMessages = ( 181 threatMessages = (
182 WebBrowserWindow.safeBrowsingManager() 182 WebBrowserWindow.safeBrowsingManager()
183 .getThreatMessages(threatLists) 183 .getThreatMessages(threatLists)
184 ) 184 )
185 res = E5MessageBox.warning( 185 res = EricMessageBox.warning(
186 WebBrowserWindow.getWindow(), 186 WebBrowserWindow.getWindow(),
187 self.tr("Suspicuous URL detected"), 187 self.tr("Suspicuous URL detected"),
188 self.tr("<p>The URL <b>{0}</b> was found in the Safe" 188 self.tr("<p>The URL <b>{0}</b> was found in the Safe"
189 " Browsing database.</p>{1}").format( 189 " Browsing database.</p>{1}").format(
190 url.toString(), "".join(threatMessages)), 190 url.toString(), "".join(threatMessages)),
191 E5MessageBox.Abort | E5MessageBox.Ignore, 191 EricMessageBox.Abort | EricMessageBox.Ignore,
192 E5MessageBox.Abort) 192 EricMessageBox.Abort)
193 if res == E5MessageBox.Abort: 193 if res == EricMessageBox.Abort:
194 self.safeBrowsingAbort.emit() 194 self.safeBrowsingAbort.emit()
195 return False 195 return False
196 196
197 self.__badSite = True 197 self.__badSite = True
198 threatType = ( 198 threatType = (
693 from EricNetwork.EricSslInfoWidget import EricSslInfoWidget 693 from EricNetwork.EricSslInfoWidget import EricSslInfoWidget
694 widget = EricSslInfoWidget(self.url(), self.__sslConfiguration, 694 widget = EricSslInfoWidget(self.url(), self.__sslConfiguration,
695 self.view()) 695 self.view())
696 widget.showAt(pos) 696 widget.showAt(pos)
697 else: 697 else:
698 E5MessageBox.warning( 698 EricMessageBox.warning(
699 self.view(), 699 self.view(),
700 self.tr("SSL Info"), 700 self.tr("SSL Info"),
701 self.tr("""This site does not contain SSL information.""")) 701 self.tr("""This site does not contain SSL information."""))
702 702
703 def hasValidSslInfo(self): 703 def hasValidSslInfo(self):

eric ide

mercurial