diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-table-memory-store.c | 20 | ||||
-rw-r--r-- | widgets/table/e-table-memory-store.h | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c index 5cf59a7033..c54bfb6190 100644 --- a/widgets/table/e-table-memory-store.c +++ b/widgets/table/e-table-memory-store.c @@ -332,6 +332,26 @@ e_table_memory_store_insert (ETableMemoryStore *etms, int row, void **store, gpo } void +e_table_memory_store_insert_list (ETableMemoryStore *etms, int row, gpointer data, ...) +{ + void **store; + va_list args; + int i; + + store = g_new (void *, etms->priv->col_count + 1); + + va_start (args, data); + for (i = 0; i < etms->priv->col_count; i++) { + store[i] = va_arg (args, void *); + } + va_end (args); + + e_table_memory_store_insert (etms, row, store, data); + + g_free (store); +} + +void e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, void **store, gpointer data) { int row_count; diff --git a/widgets/table/e-table-memory-store.h b/widgets/table/e-table-memory-store.h index 3a68e6df94..49f37ba201 100644 --- a/widgets/table/e-table-memory-store.h +++ b/widgets/table/e-table-memory-store.h @@ -97,6 +97,10 @@ void e_table_memory_store_insert (ETableMemoryStore int row, void **store, gpointer data); +void e_table_memory_store_insert_list (ETableMemoryStore *etms, + int row, + gpointer data, + ...); void e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, void **store, |