aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRael <rael.gc@gmail.com>2015-11-01 10:27:14 -0200
committerRael <rael.gc@gmail.com>2015-11-01 10:27:14 -0200
commit726c716436566c32792ef7ab7415547a6fc5fe48 (patch)
treecf2c7ca5d5b765aa5f8fb7e35c2be855435c6ef1
parent8441c7290bfc6bbf845593b9d5e4b5da6b4a1620 (diff)
downloadscudcloud-726c716436566c32792ef7ab7415547a6fc5fe48.zip
scudcloud-726c716436566c32792ef7ab7415547a6fc5fe48.tar.gz
scudcloud-726c716436566c32792ef7ab7415547a6fc5fe48.tar.bz2
Restoring wrapper timer to override notifications
-rw-r--r--scudcloud-1.0/lib/wrapper.py11
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)