Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pg mr
gajim
Commits
6c83ae35
Commit
6c83ae35
authored
Dec 28, 2020
by
Philipp Hörist
Browse files
Profile: Sort VCard on save
parent
3cf19c3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
gajim/gtk/profile.py
View file @
6c83ae35
...
...
@@ -197,7 +197,6 @@ def _on_cancel_clicked(self, _widget):
self
.
_ui
.
nickname_entry
.
set_sensitive
(
False
)
self
.
_ui
.
avatar_image
.
set_from_surface
(
self
.
_current_avatar
)
self
.
_ui
.
nickname_entry
.
set_text
(
app
.
nicks
[
self
.
account
])
self
.
_vcard_grid
.
clear
()
self
.
_vcard_grid
.
set_vcard
(
self
.
_current_vcard
.
copy
())
self
.
_new_avatar
=
False
...
...
@@ -214,6 +213,7 @@ def _on_save_clicked(self, _widget):
self
.
_ui
.
nickname_entry
.
set_sensitive
(
False
)
self
.
_vcard_grid
.
validate
()
self
.
_vcard_grid
.
sort
()
vcard
=
self
.
_vcard_grid
.
get_vcard
()
self
.
_current_vcard
=
vcard
.
copy
()
...
...
gajim/gtk/vcard_grid.py
View file @
6c83ae35
...
...
@@ -158,6 +158,7 @@ def set_editable(self, enabled):
prop
.
set_editable
(
enabled
)
def
set_vcard
(
self
,
vcard
):
self
.
clear
()
self
.
_vcard
=
vcard
for
entry
in
ORDER
:
...
...
@@ -205,6 +206,9 @@ def clear(self):
self
.
_props
=
[]
def
sort
(
self
):
self
.
set_vcard
(
self
.
_vcard
)
class
DescriptionLabel
(
Gtk
.
Label
):
def
__init__
(
self
,
value
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment