From a0bfb48ea7f1ddce8d55341939249fcc49ba754b Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 21 Aug 2001 00:52:33 +0000 Subject: We need to free_gotten_key_func key2, not key! (e_table_without_show): 2001-08-20 Jon Trowbridge * e-table-without.c (check_with_key): We need to free_gotten_key_func key2, not key! (e_table_without_show): Renamed, used to be e_table_without_remove. Double-negative function names are confusing! (e_table_without_hide_adopt): Renamed, used to be e_table_without_add_adopt. (e_table_without_hide): Renamed, used to be e_table_without_add. 2001-08-20 Jon Trowbridge * configure.in: Increment version number to 0.10.99.5 for changes to ETableWithout api. svn path=/trunk/; revision=12332 --- widgets/table/e-table-without.c | 12 +++++++----- widgets/table/e-table-without.h | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c index a597ac7381..db05b072d1 100644 --- a/widgets/table/e-table-without.c +++ b/widgets/table/e-table-without.c @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * E-table-subset.c: Implements a table that contains a subset of another table. + * E-table-without.c: Implements a table that contains a subset of another table. * * Author: * Miguel de Icaza (miguel@gnu.org) @@ -69,7 +69,7 @@ check_with_key (ETableWithout *etw, void *key, int model_row) else ret_val = (key == key2); if (etw->priv->free_gotten_key_func) - etw->priv->free_gotten_key_func (key, etw->priv->closure); + etw->priv->free_gotten_key_func (key2, etw->priv->closure); return ret_val; } @@ -275,7 +275,7 @@ e_table_without_new (ETableModel *source, return (ETableModel *) etw; } -void e_table_without_add (ETableWithout *etw, +void e_table_without_hide (ETableWithout *etw, void *key) { int i; /* View row */ @@ -294,7 +294,7 @@ void e_table_without_add (ETableWithout *etw, } /* An adopted key will later be freed using the free_duplicated_key function. */ -void e_table_without_add_adopt (ETableWithout *etw, +void e_table_without_hide_adopt (ETableWithout *etw, void *key) { int i; /* View row */ @@ -309,7 +309,7 @@ void e_table_without_add_adopt (ETableWithout *etw, } } -void e_table_without_remove (ETableWithout *etw, +void e_table_without_show (ETableWithout *etw, void *key) { int i; /* Model row */ @@ -325,8 +325,10 @@ void e_table_without_remove (ETableWithout *etw, } } if (g_hash_table_lookup_extended (etw->priv->hash, key, &old_key, NULL)) { +#if 0 if (etw->priv->free_duplicated_key_func) etw->priv->free_duplicated_key_func (key, etw->priv->closure); +#endif g_hash_table_remove (etw->priv->hash, key); } } diff --git a/widgets/table/e-table-without.h b/widgets/table/e-table-without.h index e73932c713..62dd718f28 100644 --- a/widgets/table/e-table-without.h +++ b/widgets/table/e-table-without.h @@ -52,11 +52,11 @@ ETableModel *e_table_without_construct (ETableWithout *etw, ETableWithoutFreeKeyFunc free_gotten_key_func, ETableWithoutFreeKeyFunc free_duplicated_key_func, void *closure); -void e_table_without_add (ETableWithout *etw, +void e_table_without_hide (ETableWithout *etw, void *key); -void e_table_without_add_adopt (ETableWithout *etw, +void e_table_without_hide_adopt (ETableWithout *etw, void *key); -void e_table_without_remove (ETableWithout *etw, +void e_table_without_show (ETableWithout *etw, void *key); #ifdef __cplusplus } -- cgit v1.2.3