aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-toggle.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-cell-toggle.c')
-rw-r--r--widgets/table/e-cell-toggle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 1ee06c15ea..a5b396333d 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -63,6 +63,8 @@ etog_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
toggle_view->cell_view.ecell = ecell;
toggle_view->cell_view.e_table_model = table_model;
toggle_view->cell_view.e_table_item_view = e_table_item_view;
+ toggle_view->cell_view.kill_view_cb = NULL;
+ toggle_view->cell_view.kill_view_cb_data = NULL;
toggle_view->canvas = canvas;
toggle_view->pixmap_cache = g_new (GdkPixmap *, etog->n_states * CACHE_SEQ_COUNT);
for (i = 0; i < etog->n_states * CACHE_SEQ_COUNT; i++)
@@ -78,6 +80,12 @@ etog_kill_view (ECellView *ecell_view)
ECellToggleView *toggle_view = (ECellToggleView *) ecell_view;
int i;
+ if (toggle_view->cell_view.kill_view_cb)
+ (toggle_view->cell_view.kill_view_cb)(ecell_view, toggle_view->cell_view.kill_view_cb_data);
+
+ if (toggle_view->cell_view.kill_view_cb_data)
+ g_list_free(toggle_view->cell_view.kill_view_cb_data);
+
for (i = 0; i < etog->n_states * CACHE_SEQ_COUNT; i++)
if (toggle_view->pixmap_cache[i])
g_object_unref (toggle_view->pixmap_cache[i]);