18 from E5Gui import E5MessageBox, E5FileDialog |
18 from E5Gui import E5MessageBox, E5FileDialog |
19 |
19 |
20 from .Ui_SiteInfoDialog import Ui_SiteInfoDialog |
20 from .Ui_SiteInfoDialog import Ui_SiteInfoDialog |
21 |
21 |
22 from ..Tools import Scripts, WebBrowserTools |
22 from ..Tools import Scripts, WebBrowserTools |
|
23 from ..WebBrowserPage import WebBrowserPage |
23 |
24 |
24 import UI.PixmapCache |
25 import UI.PixmapCache |
25 |
26 |
26 |
27 |
27 class SiteInfoDialog(QDialog, Ui_SiteInfoDialog): |
28 class SiteInfoDialog(QDialog, Ui_SiteInfoDialog): |
73 self.securityLabel.setText('<b>Connection is encrypted.</b>') |
74 self.securityLabel.setText('<b>Connection is encrypted.</b>') |
74 else: |
75 else: |
75 self.securityLabel.setStyleSheet(SiteInfoDialog.nokStyle) |
76 self.securityLabel.setStyleSheet(SiteInfoDialog.nokStyle) |
76 self.securityLabel.setText('<b>Connection is not encrypted.</b>') |
77 self.securityLabel.setText('<b>Connection is not encrypted.</b>') |
77 browser.page().runJavaScript( |
78 browser.page().runJavaScript( |
78 "document.charset", |
79 "document.charset", WebBrowserPage.SafeJsWorld, |
79 lambda res: self.encodingLabel.setText(res)) |
80 lambda res: self.encodingLabel.setText(res)) |
80 |
81 |
81 # populate Meta tags |
82 # populate Meta tags |
82 browser.page().runJavaScript(Scripts.getAllMetaAttributes(), |
83 browser.page().runJavaScript(Scripts.getAllMetaAttributes(), |
|
84 WebBrowserPage.SafeJsWorld, |
83 self.__processMetaAttributes) |
85 self.__processMetaAttributes) |
84 |
86 |
85 # populate Media tab |
87 # populate Media tab |
86 browser.page().runJavaScript(Scripts.getAllImages(), |
88 browser.page().runJavaScript(Scripts.getAllImages(), |
|
89 WebBrowserPage.SafeJsWorld, |
87 self.__processImageTags) |
90 self.__processImageTags) |
88 |
91 |
89 def __processImageTags(self, res): |
92 def __processImageTags(self, res): |
90 """ |
93 """ |
91 Private method to process the image tags. |
94 Private method to process the image tags. |