Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
5182407c by wurstsalat at 2021-12-06T20:28:18+01:00
ConversationView: Remove reference to filter_func on destroy

- - - - -
ab24173c by wurstsalat at 2021-12-06T21:17:26+01:00
ContactInfo: Simplify code

- - - - -


2 changed files:

- gajim/gtk/contact_info.py
- gajim/gtk/conversation/view.py


Changes:

=====================================
gajim/gtk/contact_info.py
=====================================
@@ -123,8 +123,6 @@ def __init__(self, account, contact, page=None):
             if contact.real_jid is not None:
                 self._devices_grid = DevicesGrid(self._ui.devices_grid)
                 self._query_devices()
-                self._update_timeout_id = GLib.timeout_add(
-                    100, self._update_timer)
 
                 self._ui.contact_jid_label.set_text(
                     str(contact.real_jid.bare))
@@ -144,9 +142,7 @@ def __init__(self, account, contact, page=None):
         if contact.is_in_roster:
             self._devices_grid = DevicesGrid(self._ui.devices_grid)
             self._query_devices()
-            self._update_timeout_id = GLib.timeout_add(100, self._update_timer)
 
-        if contact.is_in_roster:
             note = self._client.get_module('Annotations').get_note(contact.jid)
             if note is not None:
                 self._ui.textview_annotation.get_buffer().set_text(note.data)
@@ -234,6 +230,8 @@ def _load_avatar(self):
         self._ui.header_image.set_from_surface(surface_2)
 
     def _query_devices(self):
+        self._update_timeout_id = GLib.timeout_add(100, self._update_timer)
+
         if self.contact.is_pm_contact:
             self._query_device(self.contact)
         else:


=====================================
gajim/gtk/conversation/view.py
=====================================
@@ -123,6 +123,11 @@ def __init__(self, account, contact):
 
         self._scroll_hint_row = ScrollHintRow(self._account)
         self.add(self._scroll_hint_row)
+        self.connect('destroy', self._on_destroy)
+
+    def _on_destroy(self, *args):
+        self.set_filter_func(None)
+        app.check_finalize(self)
 
     def lock(self) -> None:
         self.locked = True



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/46f7b5eaf79a62da3aeccd55ab3b385e6e0e95c4...ab24173c3b07fb45c061f608eed03fa56069c839

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/46f7b5eaf79a62da3aeccd55ab3b385e6e0e95c4...ab24173c3b07fb45c061f608eed03fa56069c839
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to