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
93a6e932
Commit
93a6e932
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs
#285
and
#283
parent
8aff292a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sakia/core/account.py
+1
-3
1 addition, 3 deletions
src/sakia/core/account.py
src/sakia/gui/transactions_tab.py
+18
-13
18 additions, 13 deletions
src/sakia/gui/transactions_tab.py
with
19 additions
and
16 deletions
src/sakia/core/account.py
+
1
−
3
View file @
93a6e932
...
...
@@ -12,15 +12,13 @@ import logging
import
time
import
asyncio
from
PyQt5.QtCore
import
QObject
,
pyqtSignal
,
QCoreApplication
from
PyQt5.QtNetwork
import
QNetworkReply
from
PyQt5.QtCore
import
QObject
,
pyqtSignal
from
.
import
money
from
.wallet
import
Wallet
from
.community
import
Community
from
.registry
import
LocalState
from
..tools.exceptions
import
ContactAlreadyExists
,
NoPeerAvailable
from
..tools.decorators
import
asyncify
from
ucoinpy.api
import
bma
from
ucoinpy.api.bma
import
PROTOCOL_VERSION
from
aiohttp.errors
import
ClientError
...
...
This diff is collapsed.
Click to expand it.
src/sakia/gui/transactions_tab.py
+
18
−
13
View file @
93a6e932
...
...
@@ -121,26 +121,31 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget):
self
.
progressbar
.
show
()
self
.
progressbar
.
setValue
(
value
)
self
.
progressbar
.
setMaximum
(
maximum
)
self
.
app
.
current_
account
.
loading_progressed
.
connect
(
progressing
)
self
.
app
.
current_
account
.
loading_finished
.
connect
(
self
.
stop_progress
)
self
.
account
.
loading_progressed
.
connect
(
progressing
)
self
.
account
.
loading_finished
.
connect
(
self
.
stop_progress
)
@pyqtSlot
(
list
)
def
stop_progress
(
self
,
community
,
received_list
):
if
community
==
self
.
community
:
self
.
progressbar
.
hide
()
self
.
table_history
.
model
().
sourceModel
().
refresh_transfers
()
self
.
table_history
.
resizeColumnsToContents
()
self
.
notification_reception
(
received_list
)
@asyncify
@asyncio.coroutine
def
notification_reception
(
self
,
received_list
):
if
len
(
received_list
)
>
0
:
amount
=
0
for
r
in
received_list
:
amount
+=
r
.
metadata
[
'
amount
'
]
self
.
progressbar
.
hide
()
if
len
(
received_list
)
>
0
:
text
=
self
.
tr
(
"
Received {0} {1} from {2} transfers
"
).
format
(
amount
,
self
.
community
.
currency
,
len
(
received_list
))
localized_amount
=
yield
from
self
.
app
.
current_account
.
current_ref
(
amount
,
self
.
community
,
self
.
app
)
\
.
localized
(
units
=
True
,
international_system
=
self
.
app
.
preferences
[
'
international_system_of_units
'
])
text
=
self
.
tr
(
"
Received {amount} from {number} transfers
"
).
format
(
amount
=
localized_amount
,
number
=
len
(
received_list
))
if
self
.
app
.
preferences
[
'
notifications
'
]:
toast
.
display
(
self
.
tr
(
"
New transactions received
"
),
text
)
self
.
table_history
.
model
().
sourceModel
().
refresh_transfers
()
self
.
table_history
.
resizeColumnsToContents
()
@once_at_a_time
@asyncify
@asyncio.coroutine
...
...
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