Helpviewer/SiteInfo/SiteInfoDialog.py

changeset 2432
b1a2f9054b28
parent 2403
e3d7a861547c
child 2525
8b507a9a2d40
child 3002
6ffc581f00f1
equal deleted inserted replaced
2430:fd7fa26076d2 2432:b1a2f9054b28
52 if SSL: 52 if SSL:
53 self.tabWidget.setTabIcon(3, UI.PixmapCache.getIcon("siteinfo-security.png")) 53 self.tabWidget.setTabIcon(3, UI.PixmapCache.getIcon("siteinfo-security.png"))
54 54
55 self.__mainFrame = browser.page().mainFrame() 55 self.__mainFrame = browser.page().mainFrame()
56 title = browser.title() 56 title = browser.title()
57 sslInfo = browser.page().getSslInfo() 57 sslInfo = browser.page().getSslCertificateChain()
58 58
59 # populate General tab 59 # populate General tab
60 self.heading.setText("<b>{0}</b>".format(title)) 60 self.heading.setText("<b>{0}</b>".format(title))
61 self.siteAddressLabel.setText(self.__mainFrame.baseUrl().toString()) 61 self.siteAddressLabel.setText(self.__mainFrame.baseUrl().toString())
62 self.sizeLabel.setText(dataString(browser.page().totalBytes())) 62 self.sizeLabel.setText(dataString(browser.page().totalBytes()))
84 if not encoding: 84 if not encoding:
85 encoding = QWebSettings.globalSettings().defaultTextEncoding() 85 encoding = QWebSettings.globalSettings().defaultTextEncoding()
86 self.encodingLabel.setText(encoding) 86 self.encodingLabel.setText(encoding)
87 87
88 # populate the Security info and the Security tab 88 # populate the Security info and the Security tab
89 if sslInfo is not None and \ 89 if sslInfo and \
90 ((qVersion() >= "5.0.0" and not sslInfo.isBlacklisted()) or \ 90 ((qVersion() >= "5.0.0" and not sslInfo[0].isBlacklisted()) or \
91 (qVersion() < "5.0.0" and sslInfo.isValid())): 91 (qVersion() < "5.0.0" and sslInfo[0].isValid())):
92 self.securityLabel.setStyleSheet(SiteInfoDialog.okStyle) 92 self.securityLabel.setStyleSheet(SiteInfoDialog.okStyle)
93 self.securityLabel.setText('<b>Connection is encrypted.</b>') 93 self.securityLabel.setText('<b>Connection is encrypted.</b>')
94 if SSL: 94 if SSL:
95 self.sslWidget.showCertificate(sslInfo) 95 self.sslWidget.showCertificateChain(sslInfo)
96 self.securityDetailsButton.setEnabled(True) 96 self.securityDetailsButton.setEnabled(True)
97 else: 97 else:
98 self.securityDetailsButton.setEnabled(False) 98 self.securityDetailsButton.setEnabled(False)
99 else: 99 else:
100 self.securityLabel.setStyleSheet(SiteInfoDialog.nokStyle) 100 self.securityLabel.setStyleSheet(SiteInfoDialog.nokStyle)

eric ide

mercurial