7 Module implementing the URL bar widget. |
7 Module implementing the URL bar widget. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import pyqtSlot, Qt, QPointF, QUrl |
10 from PyQt4.QtCore import pyqtSlot, Qt, QPointF, QUrl |
11 from PyQt4.QtGui import QColor, QPalette, QApplication, QLinearGradient, QIcon |
11 from PyQt4.QtGui import QColor, QPalette, QApplication, QLinearGradient, QIcon |
12 from PyQt4.QtNetwork import QSslCertificate |
12 try: |
|
13 from PyQt4.QtNetwork import QSslCertificate |
|
14 except ImportError: |
|
15 QSslCertificate = None # __IGNORE_WARNING__ |
13 from PyQt4.QtWebKit import QWebSettings |
16 from PyQt4.QtWebKit import QWebSettings |
14 |
17 |
15 from E5Gui.E5LineEdit import E5LineEdit |
18 from E5Gui.E5LineEdit import E5LineEdit |
16 from E5Gui.E5LineEditButton import E5LineEditButton |
19 from E5Gui.E5LineEditButton import E5LineEditButton |
17 |
20 |
135 self.__bookmarkButton.setIcon(self.__bmInactiveIcon) |
138 self.__bookmarkButton.setIcon(self.__bmInactiveIcon) |
136 else: |
139 else: |
137 self.__bookmarkButton.setIcon(self.__bmActiveIcon) |
140 self.__bookmarkButton.setIcon(self.__bmActiveIcon) |
138 self.__bookmarkButton.setVisible(True) |
141 self.__bookmarkButton.setVisible(True) |
139 |
142 |
140 if ok and self.__browser.url().scheme() == "https": |
143 if ok and \ |
|
144 self.__browser.url().scheme() == "https" and \ |
|
145 QSslCertificate is not None: |
141 sslInfo = self.__browser.page().getSslInfo() |
146 sslInfo = self.__browser.page().getSslInfo() |
142 if sslInfo is not None: |
147 if sslInfo is not None: |
143 org = Utilities.decodeString( |
148 org = Utilities.decodeString( |
144 sslInfo.subjectInfo(QSslCertificate.Organization)) |
149 sslInfo.subjectInfo(QSslCertificate.Organization)) |
145 if org == "": |
150 if org == "": |