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
e6360fd7
Commit
e6360fd7
authored
10 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
Open automatically the imported account as current account
parent
940030a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/core/app.py
+2
-1
2 additions, 1 deletion
src/cutecoin/core/app.py
src/cutecoin/gui/mainwindow.py
+9
-4
9 additions, 4 deletions
src/cutecoin/gui/mainwindow.py
with
11 additions
and
5 deletions
src/cutecoin/core/app.py
+
2
−
1
View file @
e6360fd7
...
@@ -336,7 +336,7 @@ class Application(QObject):
...
@@ -336,7 +336,7 @@ class Application(QObject):
def
import_account
(
self
,
file
,
name
):
def
import_account
(
self
,
file
,
name
):
'''
'''
Import an account from a tar file
Import an account from a tar file
and open it
:param str file: The file path of the tar file
:param str file: The file path of the tar file
:param str name: The account name
:param str name: The account name
...
@@ -359,6 +359,7 @@ class Application(QObject):
...
@@ -359,6 +359,7 @@ class Application(QObject):
account
.
name
=
name
account
.
name
=
name
self
.
add_account
(
account
)
self
.
add_account
(
account
)
self
.
save
(
account
)
self
.
save
(
account
)
self
.
change_current_account
(
account
)
def
export_account
(
self
,
file
,
account
):
def
export_account
(
self
,
file
,
account
):
'''
'''
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/mainwindow.py
+
9
−
4
View file @
e6360fd7
...
@@ -101,6 +101,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -101,6 +101,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
open_ucoin_info
=
lambda
:
QDesktopServices
.
openUrl
(
QUrl
(
"
http://ucoin.io/theoretical/
"
))
self
.
open_ucoin_info
=
lambda
:
QDesktopServices
.
openUrl
(
QUrl
(
"
http://ucoin.io/theoretical/
"
))
self
.
homescreen
.
button_info
.
clicked
.
connect
(
self
.
open_ucoin_info
)
self
.
homescreen
.
button_info
.
clicked
.
connect
(
self
.
open_ucoin_info
)
self
.
import_dialog
=
None
self
.
export_dialog
=
None
self
.
export_dialog
=
None
# TODO: There are too much refresh() calls on startup
# TODO: There are too much refresh() calls on startup
...
@@ -343,12 +344,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -343,12 +344,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
refresh_contacts
()
self
.
refresh_contacts
()
def
import_account
(
self
):
def
import_account
(
self
):
dialog
=
ImportAccountDialog
(
self
.
app
,
self
)
self
.
import_dialog
=
ImportAccountDialog
(
self
.
app
,
self
)
dialog
.
accepted
.
connect
(
self
.
refresh
)
self
.
import_dialog
.
accepted
.
connect
(
self
.
import_account_accepted
)
dialog
.
exec_
()
self
.
import_dialog
.
exec_
()
def
import_account_accepted
(
self
):
# open account after import
self
.
action_change_account
(
self
.
import_dialog
.
edit_name
.
text
())
def
export_account
(
self
):
def
export_account
(
self
):
# Testable way of
f
using a QFileDialog
# Testable way of using a QFileDialog
self
.
export_dialog
=
QFileDialog
(
self
)
self
.
export_dialog
=
QFileDialog
(
self
)
self
.
export_dialog
.
setObjectName
(
'
ExportFileDialog
'
)
self
.
export_dialog
.
setObjectName
(
'
ExportFileDialog
'
)
self
.
export_dialog
.
setWindowTitle
(
self
.
tr
(
"
Export an account
"
))
self
.
export_dialog
.
setWindowTitle
(
self
.
tr
(
"
Export an account
"
))
...
...
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