Skip to content
Snippets Groups Projects
Commit cd3cca39 authored by inso's avatar inso
Browse files

Merge branch 'dev' of https://github.com/ucoin-io/cutecoin into dev

parents a1f3ec87 fecb1ffd
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......@@ -15,15 +15,22 @@ class Monitor(object):
The monitor is managing watchers
'''
# Dirty hack to avoid GC on monitors
# GC was causing random crashes
# We will get rid of QThreads asap
___dirty_monitors = []
def __init__(self, account):
'''
Constructor
'''
super().__init__()
self.account = account
self.threads_pool = []
self._blockchain_watchers = {}
self._network_watchers = {}
self._persons_watchers = {}
Monitor.___dirty_monitors.append(self)
def blockchain_watcher(self, community):
return self._blockchain_watchers[community.name]
......
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment