Helpviewer/UrlBar/UrlBar.py

changeset 753
e19a516f0a97
parent 661
f9d49e0c2522
child 791
9ec2ac20e54e
equal deleted inserted replaced
752:2ec6ec7cd381 753:e19a516f0a97
21 from .SslLabel import SslLabel 21 from .SslLabel import SslLabel
22 from .BookmarkInfoDialog import BookmarkInfoDialog 22 from .BookmarkInfoDialog import BookmarkInfoDialog
23 23
24 import UI.PixmapCache 24 import UI.PixmapCache
25 import Preferences 25 import Preferences
26 import Utilities
26 27
27 class UrlBar(E5LineEdit): 28 class UrlBar(E5LineEdit):
28 """ 29 """
29 Class implementing a line edit for entering URLs. 30 Class implementing a line edit for entering URLs.
30 """ 31 """
137 self.__bookmarkButton.setVisible(True) 138 self.__bookmarkButton.setVisible(True)
138 139
139 if ok and self.__browser.url().scheme() == "https": 140 if ok and self.__browser.url().scheme() == "https":
140 sslInfo = self.__browser.page().getSslInfo() 141 sslInfo = self.__browser.page().getSslInfo()
141 if sslInfo is not None: 142 if sslInfo is not None:
142 org = sslInfo.subjectInfo(QSslCertificate.Organization) 143 org = Utilities.decodeString(
144 sslInfo.subjectInfo(QSslCertificate.Organization))
143 if org == "": 145 if org == "":
144 cn = sslInfo.subjectInfo(QSslCertificate.CommonName) 146 cn = Utilities.decodeString(
147 sslInfo.subjectInfo(QSslCertificate.CommonName))
145 if cn != "": 148 if cn != "":
146 org = cn.split(".", 1)[1] 149 org = cn.split(".", 1)[1]
147 if org == "": 150 if org == "":
148 org = self.trUtf8("Unknown") 151 org = self.trUtf8("Unknown")
149 self.__sslLabel.setText(" {0} ".format(org)) 152 self.__sslLabel.setText(" {0} ".format(org))

eric ide

mercurial