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
7af0ba37
Commit
7af0ba37
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug
#373
with contact dialog
parent
be91490d
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/sakia/gui/contact.py
+22
-1
22 additions, 1 deletion
src/sakia/gui/contact.py
src/sakia/gui/mainwindow.py
+3
-3
3 additions, 3 deletions
src/sakia/gui/mainwindow.py
with
25 additions
and
4 deletions
src/sakia/gui/contact.py
+
22
−
1
View file @
7af0ba37
...
@@ -20,7 +20,13 @@ class ConfigureContactDialog(QDialog, Ui_ConfigureContactDialog):
...
@@ -20,7 +20,13 @@ class ConfigureContactDialog(QDialog, Ui_ConfigureContactDialog):
def
__init__
(
self
,
app
,
account
,
parent
=
None
,
contact
=
None
,
index_edit
=
None
):
def
__init__
(
self
,
app
,
account
,
parent
=
None
,
contact
=
None
,
index_edit
=
None
):
"""
"""
Constructor
Open the dialog to create a new contact
:param sakia.core.Application app: the application
:param sakia.core.Account account: the account
:param PyQt5.QtWidgets.QWidget parent: the parent widget
:param dict contact: the contact with a key
'
name
'
and a key
'
pubkey
'
:param int index_edit: the index of the edited contact in the account contacts list
:return:
"""
"""
super
().
__init__
(
parent
)
super
().
__init__
(
parent
)
self
.
setupUi
(
self
)
self
.
setupUi
(
self
)
...
@@ -45,6 +51,21 @@ class ConfigureContactDialog(QDialog, Ui_ConfigureContactDialog):
...
@@ -45,6 +51,21 @@ class ConfigureContactDialog(QDialog, Ui_ConfigureContactDialog):
}
}
return
ConfigureContactDialog
(
app
,
account
,
parent
,
contact
)
return
ConfigureContactDialog
(
app
,
account
,
parent
,
contact
)
@classmethod
def
new_contact
(
cls
,
app
,
account
,
parent
):
"""
Open the dialog to create a new contact
:param sakia.core.Application app: the application
:param sakia.core.Account account: the account
:param PyQt5.QtWidgets.QWidget parent: the parent widget
:return:
"""
return
ConfigureContactDialog
(
app
,
account
,
parent
)
@classmethod
def
edit_contact
(
cls
,
app
,
parent
,
account
,
index
):
return
ConfigureContactDialog
(
app
,
account
,
parent
,
None
,
index
)
def
accept
(
self
):
def
accept
(
self
):
name
=
self
.
edit_name
.
text
()
name
=
self
.
edit_name
.
text
()
pubkey
=
self
.
edit_pubkey
.
text
()
pubkey
=
self
.
edit_pubkey
.
text
()
...
...
This diff is collapsed.
Click to expand it.
src/sakia/gui/mainwindow.py
+
3
−
3
View file @
7af0ba37
...
@@ -213,12 +213,12 @@ class MainWindow(QObject):
...
@@ -213,12 +213,12 @@ class MainWindow(QObject):
@pyqtSlot
()
@pyqtSlot
()
def
delete_contact
(
self
):
def
delete_contact
(
self
):
contact
=
self
.
sender
().
data
()
contact
=
self
.
sender
().
data
()
self
.
account
.
remove_contact
s
(
contact
)
self
.
account
.
remove_contact
(
contact
)
@pyqtSlot
()
@pyqtSlot
()
def
edit_contact
(
self
):
def
edit_contact
(
self
):
index
=
self
.
sender
().
data
()
index
=
self
.
sender
().
data
()
dialog
=
ConfigureContactDialog
(
self
.
app
,
self
.
account
,
self
,
None
,
index
)
dialog
=
ConfigureContactDialog
.
edit_contact
(
self
.
app
,
self
.
account
,
self
.
widget
,
index
)
dialog
.
exec_
()
dialog
.
exec_
()
def
action_change_account
(
self
,
account_name
):
def
action_change_account
(
self
,
account_name
):
...
@@ -249,7 +249,7 @@ class MainWindow(QObject):
...
@@ -249,7 +249,7 @@ class MainWindow(QObject):
self
.
password_asker
)
self
.
password_asker
)
def
open_add_contact_dialog
(
self
):
def
open_add_contact_dialog
(
self
):
dialog
=
ConfigureContactDialog
(
self
.
app
,
self
.
account
,
self
)
dialog
=
ConfigureContactDialog
.
new_contact
(
self
.
app
,
self
.
account
,
self
.
widget
)
dialog
.
exec_
()
dialog
.
exec_
()
def
open_preferences_dialog
(
self
):
def
open_preferences_dialog
(
self
):
...
...
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