Philipp Hörist pushed to branch master at gajim / gajim


Commits:
2161690d by lovetox at 2021-12-07T21:34:02+01:00
ConversationView: Destroy rows on clear()

- Add finalize check for rows

- - - - -


2 changed files:

- gajim/gtk/conversation/rows/base.py
- gajim/gtk/conversation/view.py


Changes:

=====================================
gajim/gtk/conversation/rows/base.py
=====================================
@@ -54,6 +54,8 @@ def __init__(self, account: str, widget: Optional[str] = 
None) -> None:
             self.label.set_xalign(0)
             self.label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
 
+        self.connect('destroy', self.__destroy)
+
     @property
     def is_merged(self) -> bool:
         return self._merged
@@ -87,6 +89,10 @@ def create_name_widget(name: str, is_self: bool) -> 
Gtk.Label:
             label.get_style_context().add_class('gajim-incoming-nickname')
         return label
 
+    @staticmethod
+    def __destroy(widget: Gtk.Widget) -> None:
+        app.check_finalize(widget)
+
 
 @wrap_with_event_box
 class MoreMenuButton(Gtk.MenuButton):


=====================================
gajim/gtk/conversation/view.py
=====================================
@@ -140,6 +140,8 @@ def clear(self) -> None:
             if row.type == 'read_marker':
                 continue
             self.remove(row)
+            row.destroy()
+
         self._reset_conversation_view()
 
     def _reset_conversation_view(self) -> None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/2161690df26c10a4a0f9476627a7fed4cb0cd3f9

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/2161690df26c10a4a0f9476627a7fed4cb0cd3f9
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

Reply via email to