diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-08-03 00:56:26 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-08-03 00:56:26 +0800 |
commit | 5fbcc4828efb084344e9c5fd42ebccb288ee492f (patch) | |
tree | ba3fe53ec556c7548b6517c24925ada769d3c079 /widgets/table/e-table-subset-variable.c | |
parent | 2c7ed49b25b0ab36e003427083b331bd5bc4a61f (diff) | |
download | gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.tar gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.tar.gz gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.tar.bz2 gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.tar.lz gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.tar.xz gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.tar.zst gsoc2013-evolution-5fbcc4828efb084344e9c5fd42ebccb288ee492f.zip |
Add a handler for "model_pre_change" and properly stop editing.
2000-08-02 Christopher James Lahey <clahey@helixcode.com>
* e-table-item.c, e-table-item.h: Add a handler for
"model_pre_change" and properly stop editing.
* e-table-model.c, e-table-model.h: Added a "model_pre_change"
signal that gets sent before any row numbers are changed.
* e-table-sorted-variable.c, e-table-subset-variable.c: Emit
"model_pre_change" signals as appropriate.
* e-table-subset.c, e-table-subset.h: Proxy "model_pre_changed"
signals.
svn path=/trunk/; revision=4472
Diffstat (limited to 'widgets/table/e-table-subset-variable.c')
-rw-r--r-- | widgets/table/e-table-subset-variable.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c index 377b21c9ae..f418337092 100644 --- a/widgets/table/e-table-subset-variable.c +++ b/widgets/table/e-table-subset-variable.c @@ -30,6 +30,8 @@ etssv_add (ETableSubsetVariable *etssv, ETableSubset *etss = E_TABLE_SUBSET(etssv); int i; + e_table_model_pre_change(etm); + if (etss->n_map + 1 > etssv->n_vals_allocated){ etss->map_table = g_realloc (etss->map_table, (etssv->n_vals_allocated + INCREMENT_AMOUNT) * sizeof(int)); etssv->n_vals_allocated += INCREMENT_AMOUNT; @@ -48,9 +50,12 @@ etssv_add_all (ETableSubsetVariable *etssv) { ETableModel *etm = E_TABLE_MODEL(etssv); ETableSubset *etss = E_TABLE_SUBSET(etssv); - int rows = e_table_model_row_count(etss->source); + int rows; int i; + + e_table_model_pre_change(etm); + rows = e_table_model_row_count(etss->source); if (etss->n_map + rows > etssv->n_vals_allocated){ etssv->n_vals_allocated += MAX(INCREMENT_AMOUNT, rows); etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(int)); @@ -72,6 +77,7 @@ etssv_remove (ETableSubsetVariable *etssv, for (i = 0; i < etss->n_map; i++){ if (etss->map_table[i] == row) { + e_table_model_pre_change (etm); memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(int)); etss->n_map --; |