aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-03-26 03:22:25 +0800
committerChris Lahey <clahey@src.gnome.org>2002-03-26 03:22:25 +0800
commit660118fcbe6e5d08d2c54588bfd0a58b5d346f20 (patch)
tree3046222b7e50c855e2eb22f3c801a825bd5ee953
parent8e70cce274c49ff3b60050cf2fd94d9a01a1bbd6 (diff)
downloadgsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.tar
gsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.tar.gz
gsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.tar.bz2
gsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.tar.lz
gsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.tar.xz
gsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.tar.zst
gsoc2013-evolution-660118fcbe6e5d08d2c54588bfd0a58b5d346f20.zip
Call the parent function after doing all the internal work so that when
2002-03-25 Christopher James Lahey <clahey@ximian.com> * e-table-memory-store.c (e_table_memory_store_insert, e_table_memory_store_insert_adopt, e_table_memory_store_remove): Call the parent function after doing all the internal work so that when the changed signal goes out, our work is already done. svn path=/trunk/; revision=16245
-rw-r--r--widgets/table/e-table-memory-store.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 078f49b1fc..f3f29e54ee 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -332,9 +332,7 @@ e_table_memory_store_insert (ETableMemoryStore *etms, int row, void **store, gpo
int row_count;
int i;
- e_table_memory_insert (E_TABLE_MEMORY (etms), row, data);
-
- row_count = e_table_model_row_count (E_TABLE_MODEL (etms));
+ row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) + 1;
if (row == -1)
row = row_count - 1;
etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *));
@@ -345,6 +343,8 @@ e_table_memory_store_insert (ETableMemoryStore *etms, int row, void **store, gpo
for (i = 0; i < etms->priv->col_count; i++) {
STORE_LOCATOR(etms, i, row) = duplicate_value(etms, i, store[i]);
}
+
+ e_table_memory_insert (E_TABLE_MEMORY (etms), row, data);
}
void
@@ -373,9 +373,7 @@ e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, void **stor
int row_count;
int i;
- e_table_memory_insert (E_TABLE_MEMORY (etms), row, data);
-
- row_count = e_table_model_row_count (E_TABLE_MODEL (etms));
+ row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) + 1;
if (row == -1)
row = row_count - 1;
etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *));
@@ -386,6 +384,8 @@ e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, void **stor
for (i = 0; i < etms->priv->col_count; i++) {
STORE_LOCATOR(etms, i, row) = store[i];
}
+
+ e_table_memory_insert (E_TABLE_MEMORY (etms), row, data);
}
void
@@ -393,13 +393,13 @@ e_table_memory_store_remove (ETableMemoryStore *etms, int row)
{
int row_count;
- e_table_memory_remove (E_TABLE_MEMORY (etms), row);
-
- row_count = e_table_model_row_count (E_TABLE_MODEL (etms));
+ row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) - 1;
memmove (etms->priv->store + etms->priv->col_count * row,
etms->priv->store + etms->priv->col_count * (row + 1),
etms->priv->col_count * (row_count - row) * sizeof (void *));
etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *));
+
+ e_table_memory_remove (E_TABLE_MEMORY (etms), row);
}
void