Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
cd3cca39
Commit
cd3cca39
authored
9 years ago
by
inso
Browse files
Options
Downloads
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gen_translations.py
+4
-1
4 additions, 1 deletion
gen_translations.py
src/cutecoin/core/watching/monitor.py
+8
-1
8 additions, 1 deletion
src/cutecoin/core/watching/monitor.py
src/cutecoin/gui/toast.py
+9
-4
9 additions, 4 deletions
src/cutecoin/gui/toast.py
with
21 additions
and
6 deletions
gen_translations.py
+
4
−
1
View file @
cd3cca39
...
@@ -27,7 +27,10 @@ def prepare_qm():
...
@@ -27,7 +27,10 @@ def prepare_qm():
for
(
ts_file
,
qm_file
)
in
translations
:
for
(
ts_file
,
qm_file
)
in
translations
:
# avoid conflict with qt4 lrelease by running qtchooser directly
# 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
)
print
(
ts_file
+
"
>>
"
+
qm_file
)
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/core/watching/monitor.py
+
8
−
1
View file @
cd3cca39
...
@@ -4,7 +4,7 @@ Created on 18 mars 2015
...
@@ -4,7 +4,7 @@ Created on 18 mars 2015
@author: inso
@author: inso
'''
'''
from
PyQt5.QtCore
import
QThread
,
Qt
from
PyQt5.QtCore
import
QThread
,
Qt
,
QObject
from
.blockchain
import
BlockchainWatcher
from
.blockchain
import
BlockchainWatcher
from
.persons
import
PersonsWatcher
from
.persons
import
PersonsWatcher
import
logging
import
logging
...
@@ -15,15 +15,22 @@ class Monitor(object):
...
@@ -15,15 +15,22 @@ class Monitor(object):
The monitor is managing watchers
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
):
def
__init__
(
self
,
account
):
'''
'''
Constructor
Constructor
'''
'''
super
().
__init__
()
self
.
account
=
account
self
.
account
=
account
self
.
threads_pool
=
[]
self
.
threads_pool
=
[]
self
.
_blockchain_watchers
=
{}
self
.
_blockchain_watchers
=
{}
self
.
_network_watchers
=
{}
self
.
_network_watchers
=
{}
self
.
_persons_watchers
=
{}
self
.
_persons_watchers
=
{}
Monitor
.
___dirty_monitors
.
append
(
self
)
def
blockchain_watcher
(
self
,
community
):
def
blockchain_watcher
(
self
,
community
):
return
self
.
_blockchain_watchers
[
community
.
name
]
return
self
.
_blockchain_watchers
[
community
.
name
]
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/toast.py
+
9
−
4
View file @
cd3cca39
...
@@ -6,7 +6,7 @@ Created on 1 mai 2015
...
@@ -6,7 +6,7 @@ Created on 1 mai 2015
import
sys
,
time
import
sys
,
time
import
logging
import
logging
from
PyQt5.QtCore
import
Qt
,
QThread
from
PyQt5.QtCore
import
Qt
,
QThread
from
PyQt5.QtWidgets
import
QMainWindow
from
PyQt5.QtWidgets
import
QMainWindow
,
QApplication
from
PyQt5.QtGui
import
QImage
,
QPixmap
from
PyQt5.QtGui
import
QImage
,
QPixmap
from
..gen_resources.toast_uic
import
Ui_Toast
from
..gen_resources.toast_uic
import
Ui_Toast
...
@@ -49,9 +49,14 @@ class _Toast(QMainWindow, Ui_Toast):
...
@@ -49,9 +49,14 @@ class _Toast(QMainWindow, Ui_Toast):
global
window
# some space outside the local stack
global
window
# some space outside the local stack
window
=
self
# save pointer till killed to avoid GC
window
=
self
# save pointer till killed to avoid GC
super
().
__init__
()
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
)
self
.
setupUi
(
self
)
x
=
width
-
self
.
width
()
y
=
height
-
self
.
height
()
self
.
move
(
x
,
y
)
self
.
display
.
setText
(
"""
<h1>{0}</h1>
self
.
display
.
setText
(
"""
<h1>{0}</h1>
<p>{1}</p>
"""
.
format
(
title
,
msg
))
<p>{1}</p>
"""
.
format
(
title
,
msg
))
...
@@ -69,4 +74,4 @@ class _ToastThread(QThread):
...
@@ -69,4 +74,4 @@ class _ToastThread(QThread):
QThread
.
__init__
(
self
)
QThread
.
__init__
(
self
)
def
run
(
self
):
def
run
(
self
):
time
.
sleep
(
2.0
)
time
.
sleep
(
2.0
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment