diff options
author | Miguel de Icaza <miguel@gnu.org> | 1999-12-10 15:36:51 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-12-10 15:36:51 +0800 |
commit | 48618eb6eb0d02a6bc74d19d0241ac6b0849d136 (patch) | |
tree | df66b3707b394dd8737d579f04ec9a401eb2f9b4 /widgets/e-table/e-table-header.c | |
parent | 54e2b5022a8eca59e4aac0d5b0d3cb125d54c008 (diff) | |
download | gsoc2013-evolution-48618eb6eb0d02a6bc74d19d0241ac6b0849d136.tar.gz gsoc2013-evolution-48618eb6eb0d02a6bc74d19d0241ac6b0849d136.tar.zst gsoc2013-evolution-48618eb6eb0d02a6bc74d19d0241ac6b0849d136.zip |
fix this routine.
1999-12-09 Miguel de Icaza <miguel@gnu.org>
* e-table-header.c (e_table_header_col_diff): fix this routine.
1999-12-04 Miguel de Icaza <miguel@gnu.org>
* e-table-header-item.c (ethi_event): Started drag and drop
support.
* e-table-item.c (eti_table_model_changed): The columns are
controled by the Header, not by the TableModel.
* e-table-header-item.c (ethi_draw): Fixed redraw logic to support
arbitrary header positioning.
* e-cell.h: Revamped e-cell interface. We now provide the model
column and the view column to all methods (so that the methods can
talk to the view and to the model at the same time).
* e-table-item.c: Update to new API
* e-cell-test.c: Update to new API
1999-12-03 Miguel de Icaza <miguel@gnu.org>
* e-cell.c (e_cell_class_init): Provide emtpy methods for
enter_edit, and leave_edit.
* e-table-item.c: Killed draw cell.
(eti_draw): Perform column mapping here.
(e_table_item_leave_edit): ditto.
(e_table_item_enter_edit): ditto.
(eti_event): ditto.
svn path=/trunk/; revision=1478
Diffstat (limited to 'widgets/e-table/e-table-header.c')
-rw-r--r-- | widgets/e-table/e-table-header.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/widgets/e-table/e-table-header.c b/widgets/e-table/e-table-header.c index 576f609deb..375fd34c5d 100644 --- a/widgets/e-table/e-table-header.c +++ b/widgets/e-table/e-table-header.c @@ -172,8 +172,6 @@ e_table_header_count (ETableHeader *eth) int e_table_header_index (ETableHeader *eth, int col) { - int i; - 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); @@ -316,3 +314,26 @@ e_table_header_set_size (ETableHeader *eth, int idx, int size) eth->columns [idx]->width = size; gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE], idx); } + +int +e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col) +{ + int total, col; + + g_return_val_if_fail (eth != NULL, 0); + g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); + + { + const int max_col = eth->col_count; + + total = 0; + for (col = start_col; col < end_col; col++){ + + if (col == max_col) + break; + total += eth->columns [col]->width; + } + } + + return total; +} |