Philipp Hörist pushed to branch master at gajim / gajim
Commits: ae32e629 by lovetox at 2021-12-08T13:39:37+01:00 Settings: Add finalize check
- - - - - bd12add5 by lovetox at 2021-12-08T13:40:00+01:00 PopoverSetting: Destroy popover
- - - - - 97c1cc8c by lovetox at 2021-12-08T13:52:41+01:00 Preferences: Add finalize check
- - - - -
2 changed files:
- gajim/gtk/preferences.py - gajim/gtk/settings.py
Changes:
===================================== gajim/gtk/preferences.py ===================================== @@ -95,6 +95,7 @@ def __init__(self): self._ui.audio_video_info_bar.set_revealed(not app.is_installed('AV'))
self.connect('key-press-event', self._on_key_press) + self.connect('destroy', self._on_destroy) self._ui.connect_signals(self)
self.show_all() @@ -145,6 +146,10 @@ def _check_emoji_theme(): if settings_theme not in emoji_themes: app.settings.set('emoticons_theme', 'font')
+ def _on_destroy(self, _widget): + self._prefs.clear() + app.check_finalize(self) +
class PreferenceBox(SettingsBox): def __init__(self, settings):
===================================== gajim/gtk/settings.py ===================================== @@ -104,6 +104,13 @@ def __init__(self, account=None, jid=None, extend=None): self.map[setting] = callback
self.connect('row-activated', self.on_row_activated) + self.connect('destroy', self.__on_destroy) + + @staticmethod + def __on_destroy(widget): + app.check_finalize(widget) + for row in widget.get_children(): + app.check_finalize(row)
@staticmethod def on_row_activated(_listbox, row): @@ -717,6 +724,7 @@ def update_entries(self, entries): self._add_menu_entries()
def _on_destroy(self, *args): + self._popover.destroy() app.settings.disconnect_signals(self)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/09b965e51c50ab5c25d5260469db17fa...