aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-subset.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-08-21 02:22:46 +0800
committerChris Lahey <clahey@src.gnome.org>2001-08-21 02:22:46 +0800
commitbeba0c1009c68555b294c8ec18f1ecd49a0f184f (patch)
tree8c9d938c6048fc333f5a93e2a3cc7665f54858ef /widgets/table/e-table-subset.c
parent4dd3f5e734c4582596bfdabc29ffcac8261fb74d (diff)
downloadgsoc2013-evolution-beba0c1009c68555b294c8ec18f1ecd49a0f184f.tar.gz
gsoc2013-evolution-beba0c1009c68555b294c8ec18f1ecd49a0f184f.tar.zst
gsoc2013-evolution-beba0c1009c68555b294c8ec18f1ecd49a0f184f.zip
Added these functions.
2001-08-20 Christopher James Lahey <clahey@ximian.com> * e-table-subset.c, e-table-subset.h (e_table_subset_model_to_view_row, e_table_subset_view_to_model_row): Added these functions. svn path=/trunk/; revision=12317
Diffstat (limited to 'widgets/table/e-table-subset.c')
-rw-r--r--widgets/table/e-table-subset.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index 4edb093d26..95eb85433e 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -368,6 +368,26 @@ e_table_subset_new (ETableModel *source, const int nvals)
return (ETableModel *) etss;
}
+int e_table_subset_model_to_view_row (ETableSubset *ets,
+ int model_row)
+{
+ int i;
+ for (i = 0; i < ets->n_map; i++) {
+ if (ets->map_table[i] == model_row)
+ return i;
+ }
+ return -1;
+}
+
+int e_table_subset_view_to_model_row (ETableSubset *ets,
+ int view_row)
+{
+ if (view_row >= 0 && view_row < ets->n_map)
+ return ets->map_table[view_row];
+ else
+ return -1;
+}
+
ETableModel *
e_table_subset_get_toplevel (ETableSubset *table)
{