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
GitLab 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
d715c405
Commit
d715c405
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Refresh tabs with cancel of transaction
parent
38a7ff59
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sakia/core/app.py
+1
-0
1 addition, 0 deletions
src/sakia/core/app.py
src/sakia/gui/transactions_tab.py
+1
-0
1 addition, 0 deletions
src/sakia/gui/transactions_tab.py
src/sakia/gui/widgets/context_menu.py
+4
-7
4 additions, 7 deletions
src/sakia/gui/widgets/context_menu.py
with
6 additions
and
7 deletions
src/sakia/core/app.py
+
1
−
0
View file @
d715c405
...
@@ -35,6 +35,7 @@ class Application(QObject):
...
@@ -35,6 +35,7 @@ class Application(QObject):
version_requested
=
pyqtSignal
()
version_requested
=
pyqtSignal
()
view_identity_in_wot
=
pyqtSignal
(
Identity
)
view_identity_in_wot
=
pyqtSignal
(
Identity
)
refresh_transfers
=
pyqtSignal
()
def
__init__
(
self
,
qapp
,
loop
,
identities_registry
):
def
__init__
(
self
,
qapp
,
loop
,
identities_registry
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
src/sakia/gui/transactions_tab.py
+
1
−
0
View file @
d715c405
...
@@ -62,6 +62,7 @@ class TransactionsTabWidget(QObject):
...
@@ -62,6 +62,7 @@ class TransactionsTabWidget(QObject):
model
.
modelAboutToBeReset
.
connect
(
lambda
:
self
.
ui
.
table_history
.
setEnabled
(
False
))
model
.
modelAboutToBeReset
.
connect
(
lambda
:
self
.
ui
.
table_history
.
setEnabled
(
False
))
model
.
modelReset
.
connect
(
lambda
:
self
.
ui
.
table_history
.
setEnabled
(
True
))
model
.
modelReset
.
connect
(
lambda
:
self
.
ui
.
table_history
.
setEnabled
(
True
))
self
.
app
.
refresh_transfers
.
connect
(
self
.
refresh
)
self
.
ui
.
progressbar
.
hide
()
self
.
ui
.
progressbar
.
hide
()
self
.
refresh
()
self
.
refresh
()
...
...
This diff is collapsed.
Click to expand it.
src/sakia/gui/widgets/context_menu.py
+
4
−
7
View file @
d715c405
...
@@ -144,8 +144,7 @@ class ContextMenu(QObject):
...
@@ -144,8 +144,7 @@ class ContextMenu(QObject):
async
def
send_money
(
self
,
identity
):
async
def
send_money
(
self
,
identity
):
await
TransferMoneyDialog
.
send_money_to_identity
(
self
.
_app
,
self
.
_account
,
self
.
_password_asker
,
await
TransferMoneyDialog
.
send_money_to_identity
(
self
.
_app
,
self
.
_account
,
self
.
_password_asker
,
self
.
_community
,
identity
)
self
.
_community
,
identity
)
#TODO: Send signal from account to refresh transfers
self
.
_app
.
refresh_transfers
.
emit
()
#self.ui.table_history.model().sourceModel().refresh_transfers()
def
view_wot
(
self
,
identity
):
def
view_wot
(
self
,
identity
):
self
.
view_identity_in_wot
.
emit
(
identity
)
self
.
view_identity_in_wot
.
emit
(
identity
)
...
@@ -159,18 +158,16 @@ class ContextMenu(QObject):
...
@@ -159,18 +158,16 @@ class ContextMenu(QObject):
async
def
send_again
(
self
,
transfer
):
async
def
send_again
(
self
,
transfer
):
await
TransferMoneyDialog
.
send_transfer_again
(
self
.
_app
,
self
.
_app
.
current_account
,
await
TransferMoneyDialog
.
send_transfer_again
(
self
.
_app
,
self
.
_app
.
current_account
,
self
.
_password_asker
,
self
.
_community
,
transfer
)
self
.
_password_asker
,
self
.
_community
,
transfer
)
#TODO: Send signal from account to refresh transfers
self
.
_app
.
refresh_transfers
.
emit
()
#self.ui.table_history.model().sourceModel().refresh_transfers()
def
cancel_transfer
(
self
,
transfer
):
def
cancel_transfer
(
self
,
transfer
):
reply
=
QMessageBox
.
warning
(
self
,
self
.
tr
(
"
Warning
"
),
reply
=
QMessageBox
.
warning
(
self
.
qmenu
,
self
.
tr
(
"
Warning
"
),
self
.
tr
(
"""
Are you sure ?
self
.
tr
(
"""
Are you sure ?
This money transfer will be removed and not sent.
"""
),
This money transfer will be removed and not sent.
"""
),
QMessageBox
.
Ok
|
QMessageBox
.
Cancel
)
QMessageBox
.
Ok
|
QMessageBox
.
Cancel
)
if
reply
==
QMessageBox
.
Ok
:
if
reply
==
QMessageBox
.
Ok
:
transfer
.
cancel
()
transfer
.
cancel
()
#TODO: Send signal from transfer to refresh transfers
self
.
_app
.
refresh_transfers
.
emit
()
#self.ui.table_history.model().sourceModel().refresh_transfers()
@asyncify
@asyncify
async
def
copy_transaction_to_clipboard
(
self
,
tx
):
async
def
copy_transaction_to_clipboard
(
self
,
tx
):
...
...
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