aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-10 01:17:34 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-10 01:17:34 +0800
commitac7def3e9d77081212b6a0537fa86e2172701634 (patch)
treeafdd991f258bf9027536c301915fbf1957adaea6 /widgets
parente7996a7ab1879d9602cb03824b9bcfda9a92f43f (diff)
downloadgsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.tar
gsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.tar.gz
gsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.tar.bz2
gsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.tar.lz
gsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.tar.xz
gsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.tar.zst
gsoc2013-evolution-ac7def3e9d77081212b6a0537fa86e2172701634.zip
Fixed etssv_remove.
2000-05-09 Christopher James Lahey <clahey@helixcode.com> * e-table-subset-variable.c: Fixed etssv_remove. svn path=/trunk/; revision=2951
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-table/ChangeLog4
-rw-r--r--widgets/e-table/e-table-subset-variable.c13
-rw-r--r--widgets/table/e-table-subset-variable.c13
3 files changed, 26 insertions, 4 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 150496f4bf..2f0457a3ff 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-09 Christopher James Lahey <clahey@helixcode.com>
+
+ * e-table-subset-variable.c: Fixed etssv_remove.
+
2000-05-08 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c: Make multi-line texts display properly. Fixed
diff --git a/widgets/e-table/e-table-subset-variable.c b/widgets/e-table/e-table-subset-variable.c
index c42d53842b..a8948c5e68 100644
--- a/widgets/e-table/e-table-subset-variable.c
+++ b/widgets/e-table/e-table-subset-variable.c
@@ -68,6 +68,7 @@ etssv_remove (ETableSubsetVariable *etssv,
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
int i;
+ int ret_val = FALSE;
for (i = 0; i < etss->n_map; i++){
if (etss->map_table[i] == row) {
@@ -75,10 +76,18 @@ etssv_remove (ETableSubsetVariable *etssv,
etss->n_map --;
if (!etm->frozen)
e_table_model_changed (etm);
- return TRUE;
+ ret_val = TRUE;
+ break;
}
}
- return FALSE;
+
+ for (i = 0; i < etss->n_map; i++){
+ if (etss->map_table[i] > row) {
+ etss->map_table[i] --;
+ }
+ }
+
+ return ret_val;
}
static void
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index c42d53842b..a8948c5e68 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -68,6 +68,7 @@ etssv_remove (ETableSubsetVariable *etssv,
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
int i;
+ int ret_val = FALSE;
for (i = 0; i < etss->n_map; i++){
if (etss->map_table[i] == row) {
@@ -75,10 +76,18 @@ etssv_remove (ETableSubsetVariable *etssv,
etss->n_map --;
if (!etm->frozen)
e_table_model_changed (etm);
- return TRUE;
+ ret_val = TRUE;
+ break;
}
}
- return FALSE;
+
+ for (i = 0; i < etss->n_map; i++){
+ if (etss->map_table[i] > row) {
+ etss->map_table[i] --;
+ }
+ }
+
+ return ret_val;
}
static void