Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
792a83bf by wurstsalat at 2022-07-04T12:19:18+02:00
fix: ContactInfo: Preserve groups when changing contact name
Fixes #11028
- - - - -
1 changed file:
- gajim/gtk/contact_info.py
Changes:
=====================================
gajim/gtk/contact_info.py
=====================================
@@ -332,10 +332,15 @@ def _on_edit_name_toggled(self, widget: Gtk.ToggleButton)
-> None:
self._ui.name_entry.set_sensitive(active)
if active:
self._ui.name_entry.grab_focus()
+ else:
+ name = self._ui.name_entry.get_text()
+ if name == self.contact.name:
+ return
- name = self._ui.name_entry.get_text()
- self._client.get_module('Roster').set_item(self.contact.jid, name)
- self._ui.contact_name_label.set_text(name)
+ assert isinstance(self.contact, BareContact)
+ self._client.get_module('Roster').set_item(
+ self.contact.jid, name, self.contact.groups)
+ self._ui.contact_name_label.set_text(name)
def _on_name_entry_activate(self, _widget: Gtk.Entry) -> None:
self._ui.edit_name_button.set_active(False)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/792a83bf37304c0d367246c5b02948ff5a0b75a3
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/792a83bf37304c0d367246c5b02948ff5a0b75a3
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits