diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-table-without.c | 31 | ||||
-rw-r--r-- | widgets/table/e-table-without.h | 1 |
2 files changed, 30 insertions, 2 deletions
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c index db05b072d1..e14b8aca8b 100644 --- a/widgets/table/e-table-without.c +++ b/widgets/table/e-table-without.c @@ -309,8 +309,9 @@ void e_table_without_hide_adopt (ETableWithout *etw, } } -void e_table_without_show (ETableWithout *etw, - void *key) +void +e_table_without_show (ETableWithout *etw, + void *key) { int i; /* Model row */ ETableSubset *etss = E_TABLE_SUBSET (etw); @@ -332,3 +333,29 @@ void e_table_without_show (ETableWithout *etw, g_hash_table_remove (etw->priv->hash, key); } } + +void +e_table_without_show_all (ETableWithout *etw) +{ + int i; /* Model row */ + int row_count; + ETableSubset *etss = E_TABLE_SUBSET (etw); + + if (etw->priv->hash) { + g_hash_table_foreach (etw->priv->hash, delete_hash_element, etw); + g_hash_table_destroy (etw->priv->hash); + etw->priv->hash = NULL; + } + etw->priv->hash = g_hash_table_new (etw->priv->hash_func, etw->priv->compare_func); + + g_free (etss->map_table); + row_count = e_table_model_row_count (E_TABLE_MODEL(etw)); + etss->map_table = g_new (int, row_count); + + for (i = 0; i < row_count; i++) { + etss->map_table[i++] = i; + } + etss->n_map = i; + + e_table_model_changed (E_TABLE_MODEL (etw)); +} diff --git a/widgets/table/e-table-without.h b/widgets/table/e-table-without.h index 62dd718f28..9916719eb8 100644 --- a/widgets/table/e-table-without.h +++ b/widgets/table/e-table-without.h @@ -58,6 +58,7 @@ void e_table_without_hide_adopt (ETableWithout *etw, void *key); void e_table_without_show (ETableWithout *etw, void *key); +void e_table_without_show_all (ETableWithout *etw); #ifdef __cplusplus } #endif /* __cplusplus */ |