From cb9bebee1ecb217da33c52359c93e5c7e7d22435 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Wed, 26 Dec 2012 23:18:50 +0000 Subject: [PATCH] Fix crash on callback after clean_up in gallerytab svn: r20848 --- gramps/gui/editors/displaytabs/gallerytab.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gramps/gui/editors/displaytabs/gallerytab.py b/gramps/gui/editors/displaytabs/gallerytab.py index f369348d8..450f29e0c 100644 --- a/gramps/gui/editors/displaytabs/gallerytab.py +++ b/gramps/gui/editors/displaytabs/gallerytab.py @@ -219,7 +219,7 @@ class GalleryTab(ButtonTab, DbGUIElement): self.iconlist.set_selection_mode(Gtk.SelectionMode.SINGLE) # connect the signals - self.iconlist.connect('selection-changed', self._selection_changed) + self.__id_connect_sel = self.iconlist.connect('selection-changed', self._selection_changed) self.iconlist.connect('button_press_event', self.double_click) self.iconlist.connect('key_press_event', self.key_pressed) self._connect_icon_model() @@ -563,3 +563,8 @@ class GalleryTab(ButtonTab, DbGUIElement): returns the index of the object within the associated data """ return self.get_data().index(obj) + + def clean_up(self): + print "CLEANING" + self.iconlist.disconnect(self.__id_connect_sel) + super(ButtonTab, self).clean_up()