diff --git a/gen_translations.py b/gen_translations.py index b5c5a57ec245f27e14093416d13b3cf78dfde132..0163910a72f8b876f7139bf1be9bb17dce066214 100644 --- a/gen_translations.py +++ b/gen_translations.py @@ -27,7 +27,10 @@ def prepare_qm(): for (ts_file, qm_file) in translations: # avoid conflict with qt4 lrelease by running qtchooser directly - subprocess.call(["qtchooser", "-run-tool=lrelease", "-qt=5", ts_file, "-qm", qm_file]) + if sys.platform.startswith('win'): + subprocess.call(["lrelease", ts_file, "-qm", qm_file]) + else: + subprocess.call(["qtchooser", "-run-tool=lrelease", "-qt=5", ts_file, "-qm", qm_file]) print(ts_file + " >> " + qm_file) diff --git a/src/cutecoin/core/watching/monitor.py b/src/cutecoin/core/watching/monitor.py index b2181a2a8289d0ecd3fec7fc5a081e0bc73ac1f6..ca179e920b60a40afdfca1ef20dfdbc26a15e042 100644 --- a/src/cutecoin/core/watching/monitor.py +++ b/src/cutecoin/core/watching/monitor.py @@ -4,7 +4,7 @@ Created on 18 mars 2015 @author: inso ''' -from PyQt5.QtCore import QThread, Qt +from PyQt5.QtCore import QThread, Qt, QObject from .blockchain import BlockchainWatcher from .persons import PersonsWatcher import logging @@ -19,6 +19,7 @@ class Monitor(object): ''' Constructor ''' + super().__init__() self.account = account self.threads_pool = [] self._blockchain_watchers = {} diff --git a/src/cutecoin/gui/toast.py b/src/cutecoin/gui/toast.py index f96cb04a44d519f7024cd631b2e8e31154b884c1..ef0c8ab7b265a101245635303c789e0473dbb30f 100644 --- a/src/cutecoin/gui/toast.py +++ b/src/cutecoin/gui/toast.py @@ -6,7 +6,7 @@ Created on 1 mai 2015 import sys, time import logging from PyQt5.QtCore import Qt, QThread -from PyQt5.QtWidgets import QMainWindow +from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5.QtGui import QImage, QPixmap from ..gen_resources.toast_uic import Ui_Toast @@ -49,9 +49,14 @@ class _Toast(QMainWindow, Ui_Toast): global window # some space outside the local stack window = self # save pointer till killed to avoid GC super().__init__() - self.setWindowFlags(Qt.FramelessWindowHint) + rect = QApplication.desktop().availableGeometry() + height = rect.height() + width = rect.width() + self.setWindowFlags(Qt.FramelessWindowHint |Qt.NoDropShadowWindowHint) self.setupUi(self) - + x = width - self.width() + y = height - self.height() + self.move(x, y) self.display.setText("""<h1>{0}</h1> <p>{1}</p>""".format(title, msg)) @@ -69,4 +74,4 @@ class _ToastThread(QThread): QThread.__init__(self) def run(self): - time.sleep(2.0) \ No newline at end of file + time.sleep(2.0)