aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-03-29 01:23:43 +0800
committerMilan Crha <mcrha@redhat.com>2012-03-29 01:23:43 +0800
commitc17965f62a4a4df2870fe4c46bc101803bafd414 (patch)
treecd73232e42dc681a0dae793bc709b7d4ff0c6115
parent7526d5ed934719a633fd29a5eb726c85a5f42f89 (diff)
downloadgsoc2013-evolution-c17965f62a4a4df2870fe4c46bc101803bafd414.tar.gz
gsoc2013-evolution-c17965f62a4a4df2870fe4c46bc101803bafd414.tar.zst
gsoc2013-evolution-c17965f62a4a4df2870fe4c46bc101803bafd414.zip
Bug #617930 - Crash under mail_sidebar_model_loaded_row_cb
-rw-r--r--mail/e-mail-sidebar.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c
index d347125814..f0678f7fdf 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -223,6 +223,24 @@ mail_sidebar_constructed (GObject *object)
}
static void
+mail_sidebar_dispose (GObject *object)
+{
+ GtkTreeSelection *selection;
+ GtkTreeView *tree_view;
+ GtkTreeModel *model;
+
+ tree_view = GTK_TREE_VIEW (object);
+ model = gtk_tree_view_get_model (tree_view);
+ selection = gtk_tree_view_get_selection (tree_view);
+
+ g_signal_handlers_disconnect_by_func (model, mail_sidebar_model_loaded_row_cb, object);
+ g_signal_handlers_disconnect_by_func (selection, mail_sidebar_selection_changed_cb, object);
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_mail_sidebar_parent_class)->dispose (object);
+}
+
+static void
mail_sidebar_row_expanded (GtkTreeView *tree_view,
GtkTreeIter *unused,
GtkTreePath *path)
@@ -431,6 +449,7 @@ e_mail_sidebar_class_init (EMailSidebarClass *class)
object_class->set_property = mail_sidebar_set_property;
object_class->get_property = mail_sidebar_get_property;
object_class->constructed = mail_sidebar_constructed;
+ object_class->dispose = mail_sidebar_dispose;
tree_view_class = GTK_TREE_VIEW_CLASS (class);
tree_view_class->row_expanded = mail_sidebar_row_expanded;