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
aa9f1705
Commit
aa9f1705
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix account deletion
parent
e943f355
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cutecoin/core/app.py
+1
-0
1 addition, 0 deletions
src/cutecoin/core/app.py
src/cutecoin/gui/mainwindow.py
+17
-11
17 additions, 11 deletions
src/cutecoin/gui/mainwindow.py
src/cutecoin/gui/process_cfg_account.py
+0
-2
0 additions, 2 deletions
src/cutecoin/gui/process_cfg_account.py
with
18 additions
and
13 deletions
src/cutecoin/core/app.py
+
1
−
0
View file @
aa9f1705
...
@@ -157,6 +157,7 @@ class Application(QObject):
...
@@ -157,6 +157,7 @@ class Application(QObject):
Delete an account.
Delete an account.
Current account changes to None if it is deleted.
Current account changes to None if it is deleted.
"""
"""
account
.
stop_coroutines
()
self
.
accounts
.
pop
(
account
.
name
)
self
.
accounts
.
pop
(
account
.
name
)
if
self
.
current_account
==
account
:
if
self
.
current_account
==
account
:
self
.
current_account
=
None
self
.
current_account
=
None
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/mainwindow.py
+
17
−
11
View file @
aa9f1705
...
@@ -24,9 +24,11 @@ from .process_cfg_community import ProcessConfigureCommunity
...
@@ -24,9 +24,11 @@ from .process_cfg_community import ProcessConfigureCommunity
from
.homescreen
import
HomeScreenWidget
from
.homescreen
import
HomeScreenWidget
from
..core
import
money
from
..core
import
money
from
..core.community
import
Community
from
..core.community
import
Community
from
..tools.decorators
import
asyncify
from
..__init__
import
__version__
from
..__init__
import
__version__
from
.
import
toast
from
.
import
toast
import
asyncio
import
logging
import
logging
...
@@ -93,11 +95,24 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -93,11 +95,24 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
community_view
.
change_account
(
self
.
app
.
current_account
,
self
.
password_asker
)
self
.
community_view
.
change_account
(
self
.
app
.
current_account
,
self
.
password_asker
)
self
.
refresh
()
self
.
refresh
()
def
open_add_account_dialog
(
self
):
@asyncify
@asyncio.coroutine
def
open_add_account_dialog
(
self
,
checked
=
False
):
dialog
=
ProcessConfigureAccount
(
self
.
app
,
None
)
dialog
=
ProcessConfigureAccount
(
self
.
app
,
None
)
result
=
dialog
.
exec_
()
result
=
yield
from
dialog
.
async_exec
()
if
result
==
QDialog
.
Accepted
:
self
.
action_change_account
(
self
.
app
.
current_account
.
name
)
@asyncify
@asyncio.coroutine
def
open_configure_account_dialog
(
self
,
checked
=
False
):
dialog
=
ProcessConfigureAccount
(
self
.
app
,
self
.
app
.
current_account
)
result
=
yield
from
dialog
.
async_exec
()
if
result
==
QDialog
.
Accepted
:
if
result
==
QDialog
.
Accepted
:
if
self
.
app
.
current_account
:
self
.
action_change_account
(
self
.
app
.
current_account
.
name
)
self
.
action_change_account
(
self
.
app
.
current_account
.
name
)
else
:
self
.
refresh
()
@pyqtSlot
(
str
)
@pyqtSlot
(
str
)
def
display_error
(
self
,
error
):
def
display_error
(
self
,
error
):
...
@@ -173,15 +188,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -173,15 +188,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if
result
==
QDialog
.
Accepted
:
if
result
==
QDialog
.
Accepted
:
self
.
window
().
refresh_contacts
()
self
.
window
().
refresh_contacts
()
def
open_configure_account_dialog
(
self
):
dialog
=
ProcessConfigureAccount
(
self
.
app
,
self
.
app
.
current_account
)
result
=
dialog
.
exec_
()
if
result
==
QDialog
.
Accepted
:
if
self
.
app
.
current_account
:
self
.
action_change_account
(
self
.
app
.
current_account
.
name
)
else
:
self
.
refresh
()
def
open_preferences_dialog
(
self
):
def
open_preferences_dialog
(
self
):
dialog
=
PreferencesDialog
(
self
.
app
)
dialog
=
PreferencesDialog
(
self
.
app
)
result
=
dialog
.
exec_
()
result
=
dialog
.
exec_
()
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/process_cfg_account.py
+
0
−
2
View file @
aa9f1705
...
@@ -49,8 +49,6 @@ class StepPageInit(Step):
...
@@ -49,8 +49,6 @@ class StepPageInit(Step):
self
.
config_dialog
.
edit_account_name
.
setText
(
self
.
config_dialog
.
account
.
name
)
self
.
config_dialog
.
edit_account_name
.
setText
(
self
.
config_dialog
.
account
.
name
)
model
=
CommunitiesListModel
(
self
.
config_dialog
.
account
)
model
=
CommunitiesListModel
(
self
.
config_dialog
.
account
)
self
.
config_dialog
.
list_communities
.
setModel
(
model
)
self
.
config_dialog
.
list_communities
.
setModel
(
model
)
nb_wallets
=
len
(
self
.
config_dialog
.
account
.
wallets
)
self
.
config_dialog
.
spinbox_wallets
.
setValue
(
nb_wallets
)
self
.
config_dialog
.
password_asker
=
PasswordAskerDialog
(
self
.
config_dialog
.
account
)
self
.
config_dialog
.
password_asker
=
PasswordAskerDialog
(
self
.
config_dialog
.
account
)
self
.
config_dialog
.
button_previous
.
setEnabled
(
False
)
self
.
config_dialog
.
button_previous
.
setEnabled
(
False
)
...
...
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