aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2007-03-01 20:49:15 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2007-03-01 20:49:15 +0800
commitf85afa9f7d1b43d9eb56a5c8cb4011f3d2521306 (patch)
treef03983f6a1f059162f8da92c151c9af2ccf2a5e4
parent0697164388af8b021a3f7083fc27251ce057ea74 (diff)
downloadgsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.tar
gsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.tar.gz
gsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.tar.bz2
gsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.tar.lz
gsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.tar.xz
gsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.tar.zst
gsoc2013-evolution-f85afa9f7d1b43d9eb56a5c8cb4011f3d2521306.zip
Workaround for crash in bug #330728. Patch from Caolan McNamara.
2007-03-01 Kjartan Maraas <kmaraas@gnome.org> * e-table/gal-a11y-e-cell-tree.c: (kill_view_cb), (ectr_subcell_weak_ref), (gal_a11y_e_cell_tree_new): Workaround for crash in bug #330728. Patch from Caolan McNamara. svn path=/trunk/; revision=33268
-rw-r--r--a11y/ChangeLog7
-rw-r--r--a11y/e-table/gal-a11y-e-cell-tree.c29
2 files changed, 36 insertions, 0 deletions
diff --git a/a11y/ChangeLog b/a11y/ChangeLog
index 66ab17d866..44f8dab51c 100644
--- a/a11y/ChangeLog
+++ b/a11y/ChangeLog
@@ -1,3 +1,10 @@
+2007-03-01 Kjartan Maraas <kmaraas@gnome.org>
+
+ * e-table/gal-a11y-e-cell-tree.c: (kill_view_cb),
+ (ectr_subcell_weak_ref), (gal_a11y_e_cell_tree_new):
+ Workaround for crash in bug #330728. Patch from
+ Caolan McNamara.
+
2007-01-24 Wang Xin <jedy.wang@sun.com>
* e-text/gal-a11y-e-text.c: Fixes #400121.
diff --git a/a11y/e-table/gal-a11y-e-cell-tree.c b/a11y/e-table/gal-a11y-e-cell-tree.c
index 068658cafa..b86ecc01bd 100644
--- a/a11y/e-table/gal-a11y-e-cell-tree.c
+++ b/a11y/e-table/gal-a11y-e-cell-tree.c
@@ -50,9 +50,30 @@ ectr_model_row_changed_cb (ETableModel *etm,
}
static void
+kill_view_cb(ECellView *subcell_view,
+ GList *subcell_a11ies)
+{
+ GList *node;
+ GalA11yECell *subcell;
+ for (node = subcell_a11ies; node != NULL; node = g_list_next (node))
+ {
+ subcell = GAL_A11Y_E_CELL(node->data);
+ if (subcell && subcell->cell_view == subcell_view)
+ {
+ fprintf(stderr, "subcell_view %p deleted before the a11y object %p\n", subcell_view, subcell);
+ subcell->cell_view = NULL;
+ }
+ }
+}
+
+static void
ectr_subcell_weak_ref (GalA11yECellTree *a11y,
GalA11yECell *subcell_a11y)
{
+ ECellView *subcell_view = subcell_a11y ? subcell_a11y->cell_view : 0;
+ if (subcell_a11y && subcell_view && subcell_view->kill_view_cb_data)
+ g_list_remove(subcell_view->kill_view_cb_data, subcell_a11y);
+
g_signal_handler_disconnect (GAL_A11Y_E_CELL (a11y)->item->table_model,
a11y->model_row_changed_id);
g_object_unref (a11y);
@@ -207,6 +228,14 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
g_signal_connect (item->table_model, "model_row_changed",
G_CALLBACK (ectr_model_row_changed_cb),
subcell_a11y);
+
+ if (subcell_a11y && subcell_view)
+ {
+ subcell_view->kill_view_cb = kill_view_cb;
+ if (!g_list_find(subcell_view->kill_view_cb_data, subcell_a11y))
+ subcell_view->kill_view_cb_data = g_list_append(subcell_view->kill_view_cb_data, subcell_a11y);
+ }
+
g_object_weak_ref (G_OBJECT (subcell_a11y), (GWeakNotify) ectr_subcell_weak_ref, a11y);
return subcell_a11y;