Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gajim/gtk/account_side_bar.py')
-rw-r--r--gajim/gtk/account_side_bar.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/gajim/gtk/account_side_bar.py b/gajim/gtk/account_side_bar.py
index 949bb6d75..21dc2ad91 100644
--- a/gajim/gtk/account_side_bar.py
+++ b/gajim/gtk/account_side_bar.py
@@ -35,7 +35,10 @@ class AccountSideBar(Gtk.ListBox):
self.add(Account(account))
def remove_account(self, account):
- pass
+ for row in self.get_children():
+ if row.account == account:
+ row.destroy()
+ return
@staticmethod
def _on_row_activated(_listbox, row):
@@ -97,6 +100,7 @@ class AccountAvatar(Gtk.Image):
self._contact.connect('avatar-update', self._on_avatar_update)
self._contact.connect('presence-update', self._on_presence_update)
+ self.connect('destroy', self._on_destroy)
self._update_image()
def _on_presence_update(self, _contact, _signal_name):
@@ -110,3 +114,7 @@ class AccountAvatar(Gtk.Image):
self.get_scale_factor(),
style='round-corners')
self.set_from_surface(surface)
+
+ def _on_destroy(self, *args):
+ self._contact.disconnect_all_from_obj(self)
+ app.check_finalize(self)