diff options
-rw-r--r-- | scudcloud-1.0/lib/wrapper.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scudcloud-1.0/lib/wrapper.py b/scudcloud-1.0/lib/wrapper.py index 1d710d4..17f6c92 100644 --- a/scudcloud-1.0/lib/wrapper.py +++ b/scudcloud-1.0/lib/wrapper.py @@ -3,7 +3,7 @@ from urllib import request from urllib.parse import urlparse from resources import Resources from PyQt4 import QtWebKit, QtGui, QtCore -from PyQt4.Qt import QApplication, QKeySequence +from PyQt4.Qt import QApplication, QKeySequence, QTimer from PyQt4.QtCore import QBuffer, QByteArray, QUrl from PyQt4.QtWebKit import QWebView, QWebPage, QWebSettings from PyQt4.QtNetwork import QNetworkProxy @@ -26,6 +26,15 @@ class Wrapper(QWebView): self.linkClicked.connect(self._linkClicked) self.page().featurePermissionRequested.connect(self.permissionRequested) self.addActions() + self.setupTimer() + + # Starting a timer that will check by server side reloads (which drops ScudCloud notification) + def setupTimer(self): + timer = QTimer(self) + timer.timeout.connect(self._loadFinished) + # Hope each 10 minutes will not be produce high CPU usage + timer.setInterval(600000) + timer.start() def permissionRequested(self, frame, feature): self.page().setFeaturePermission(frame, feature, QWebPage.PermissionGrantedByUser) |