aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-06 15:41:11 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-06 15:41:11 +0800
commit7df026ac0eaa8ddb5d395bdc8d00bedf35496147 (patch)
tree5f79146ef0612741b08fe58946cbbc96ae6054dc /widgets
parentfd7b20eeab5c10546842841e3c316332c0a0359a (diff)
downloadgsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.tar
gsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.tar.gz
gsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.tar.bz2
gsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.tar.lz
gsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.tar.xz
gsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.tar.zst
gsoc2013-evolution-7df026ac0eaa8ddb5d395bdc8d00bedf35496147.zip
Have identical values get sorted by their actual row.
2000-03-06 Christopher James Lahey <clahey@helixcode.com> * e-table-sorted-variable.c: Have identical values get sorted by their actual row. svn path=/trunk/; revision=2071
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-table/ChangeLog5
-rw-r--r--widgets/e-table/e-table-sorted-variable.c3
-rw-r--r--widgets/table/e-table-sorted-variable.c3
3 files changed, 11 insertions, 0 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 2239817da5..42f01d3863 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,5 +1,10 @@
2000-03-06 Christopher James Lahey <clahey@helixcode.com>
+ * e-table-sorted-variable.c: Have identical values get sorted by
+ their actual row.
+
+2000-03-06 Christopher James Lahey <clahey@helixcode.com>
+
* e-cell-text.c: Draw selected row.
2000-03-06 Christopher James Lahey <clahey@helixcode.com>
diff --git a/widgets/e-table/e-table-sorted-variable.c b/widgets/e-table/e-table-sorted-variable.c
index 478038fdb7..907ec1cc4d 100644
--- a/widgets/e-table/e-table-sorted-variable.c
+++ b/widgets/e-table/e-table-sorted-variable.c
@@ -78,6 +78,9 @@ etsv_add (ETableSubsetVariable *etssv,
int comp_val = (*comp)(val, e_table_model_value_at(etss->source, col, etss->map_table[i]));
if ( (ascending && comp_val < 0) || ((!ascending) && comp_val > 0) )
break;
+ if ( comp_val == 0 )
+ if ( (ascending && row < etss->map_table[i]) || ((!ascending) && row > etss->map_table[i]) )
+ break;
}
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));
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index 478038fdb7..907ec1cc4d 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -78,6 +78,9 @@ etsv_add (ETableSubsetVariable *etssv,
int comp_val = (*comp)(val, e_table_model_value_at(etss->source, col, etss->map_table[i]));
if ( (ascending && comp_val < 0) || ((!ascending) && comp_val > 0) )
break;
+ if ( comp_val == 0 )
+ if ( (ascending && row < etss->map_table[i]) || ((!ascending) && row > etss->map_table[i]) )
+ break;
}
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));