12 # Copyright (C) 2014 David Rosca <nowrep@gmail.com> |
12 # Copyright (C) 2014 David Rosca <nowrep@gmail.com> |
13 # |
13 # |
14 |
14 |
15 from __future__ import unicode_literals |
15 from __future__ import unicode_literals |
16 |
16 |
17 from PyQt5.QtCore import pyqtSlot, Qt, QPoint |
17 from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QTimer |
18 from PyQt5.QtWidgets import QGraphicsColorizeEffect, QMenu, QDialog |
18 from PyQt5.QtWidgets import QGraphicsColorizeEffect, QMenu, QDialog |
19 from PyQt5.QtWebEngineWidgets import QWebEngineSettings |
19 from PyQt5.QtWebEngineWidgets import QWebEngineSettings |
20 |
20 |
21 from .StatusBarIcon import StatusBarIcon |
21 from .StatusBarIcon import StatusBarIcon |
22 |
22 |
132 """ |
132 """ |
133 from .JavaScriptSettingsDialog import JavaScriptSettingsDialog |
133 from .JavaScriptSettingsDialog import JavaScriptSettingsDialog |
134 dlg = JavaScriptSettingsDialog(self._window) |
134 dlg = JavaScriptSettingsDialog(self._window) |
135 if dlg.exec_() == QDialog.Accepted: |
135 if dlg.exec_() == QDialog.Accepted: |
136 self._window.preferencesChanged() |
136 self._window.preferencesChanged() |
|
137 QTimer.singleShot(500, self.__updateIcon) |
137 |
138 |
138 def __navigationRequestAccepted(self, url, navigationType, isMainFrame, |
139 def __navigationRequestAccepted(self, url, navigationType, isMainFrame, |
139 page): |
140 page): |
140 """ |
141 """ |
141 Private method to handle the navigationRequestAccepted signal. |
142 Private method to handle the navigationRequestAccepted signal. |