From 726c716436566c32792ef7ab7415547a6fc5fe48 Mon Sep 17 00:00:00 2001 From: Rael Date: Sun, 1 Nov 2015 10:27:14 -0200 Subject: Restoring wrapper timer to override notifications --- scudcloud-1.0/lib/wrapper.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) -- cgit v1.1