aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-header.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>1999-12-03 16:02:36 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-12-03 16:02:36 +0800
commit50006218b6fce73920132f43569f410e6d6c6ae4 (patch)
tree7fd9b0947b1393b157d6e7217d4819b78806a638 /widgets/e-table/e-table-header.c
parent2e132a09abe8303d10d25b80d1fe23e3b18c6a62 (diff)
downloadgsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.tar
gsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.tar.gz
gsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.tar.bz2
gsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.tar.lz
gsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.tar.xz
gsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.tar.zst
gsoc2013-evolution-50006218b6fce73920132f43569f410e6d6c6ae4.zip
fixed api.
1999-12-02 Miguel de Icaza <miguel@gnu.org> * e-table-header.c (e_table_header_index): fixed api. 1999-12-01 Miguel de Icaza <miguel@gnu.org> * test-cols.c (multi_cols_test): Update to simplified API. * test-check.c (check_test): ditto * test-table.c (table_browser_test): ditto * e-table-simple.c (e_table_simple_class_init): Kill column_name method. * e-table-model.h: Kill column_name method. * e-table-col.c (e_table_col_new): Instead of using a column name, use a column index. svn path=/trunk/; revision=1459
Diffstat (limited to 'widgets/e-table/e-table-header.c')
-rw-r--r--widgets/e-table/e-table-header.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/widgets/e-table/e-table-header.c b/widgets/e-table/e-table-header.c
index e91113bbb9..576f609deb 100644
--- a/widgets/e-table/e-table-header.c
+++ b/widgets/e-table/e-table-header.c
@@ -170,22 +170,15 @@ e_table_header_count (ETableHeader *eth)
}
int
-e_table_header_index (ETableHeader *eth, const char *identifier)
+e_table_header_index (ETableHeader *eth, int col)
{
int i;
- g_return_val_if_fail (eth != NULL, 0);
- g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
- g_return_val_if_fail (identifier != NULL, 0);
+ g_return_val_if_fail (eth != NULL, -1);
+ g_return_val_if_fail (E_IS_TABLE_HEADER (eth), -1);
+ g_return_val_if_fail (col < eth->col_count, -1);
- for (i = 0; i < eth->col_count; i++){
- ETableCol *tc = eth->columns [i];
-
- if (strcmp (tc->id, identifier) == 0)
- return i;
- }
-
- return -1;
+ return eth->columns [col]->col_idx;
}
int