diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-06-30 03:22:24 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-06-30 03:22:24 +0800 |
commit | 3649d5dc6d7279d6c218d241232dea73c5c773d2 (patch) | |
tree | 89520e235371866a92f889e885eb30ed09f44b6c /widgets/e-table/e-table-group-container.c | |
parent | f0bcf06559405a3de5271f4aeb3472c8a2b7aeb3 (diff) | |
download | gsoc2013-evolution-3649d5dc6d7279d6c218d241232dea73c5c773d2.tar.gz gsoc2013-evolution-3649d5dc6d7279d6c218d241232dea73c5c773d2.tar.zst gsoc2013-evolution-3649d5dc6d7279d6c218d241232dea73c5c773d2.zip |
From mail:
2000-06-29 Christopher James Lahey <clahey@helixcode.com>
* message-list.c, mail-ops.c: Changed the name of
e_table_select_row to e_table_set_cursor_row.
From widgets/e-table:
2000-06-29 Christopher James Lahey <clahey@helixcode.com>
* e-table-click-to-add.c: Made this appear a bit better.
* e-table-defines.h: Cleaned this up a bit, added
ETableForeachFunc.
* e-table-group-container.c, e-table-group-leaf.c,
e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h,
e-table.c, e-table.h: Changed e_table_select_row to
e_table_set_cursor_row. Changed e_table_get_selected_view_row to
e_table_get_cursor_row. Added e_table_selected_row_foreach.
* e-table-header-item.c: Fixed some warnings.
* e-table-sorted-variable.c: Removed some unneeded debugging print
statments.
* e-tree-example-1.c: Changed e_table_get_selected_view_row to
e_table_get_cursor_row.
svn path=/trunk/; revision=3799
Diffstat (limited to 'widgets/e-table/e-table-group-container.c')
-rw-r--r-- | widgets/e-table/e-table-group-container.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/widgets/e-table/e-table-group-container.c b/widgets/e-table/e-table-group-container.c index 6bff77d4ad..f4e10917fb 100644 --- a/widgets/e-table/e-table-group-container.c +++ b/widgets/e-table/e-table-group-container.c @@ -484,7 +484,7 @@ etgc_increment (ETableGroup *etg, gint position, gint amount) } static void -etgc_select_row (ETableGroup *etg, gint row) +etgc_set_cursor_row (ETableGroup *etg, gint row) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); GList *list; @@ -492,7 +492,7 @@ etgc_select_row (ETableGroup *etg, gint row) ETableGroup *group = ((ETableGroupContainerChildNode *)list->data)->child; gint this_count = e_table_group_row_count(group); if (row < this_count) { - e_table_group_select_row(group, row); + e_table_group_set_cursor_row(group, row); return; } row -= this_count; @@ -500,14 +500,14 @@ etgc_select_row (ETableGroup *etg, gint row) } static int -etgc_get_selected_view_row (ETableGroup *etg) +etgc_get_cursor_row (ETableGroup *etg) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); GList *list; int count = 0; for (list = etgc->children; list; list = g_list_next(list)) { ETableGroup *group = ((ETableGroupContainerChildNode *)list->data)->child; - int row = e_table_group_get_selected_view_row(group); + int row = e_table_group_get_cursor_row(group); if (row != -1) return count + row; count += e_table_group_row_count(group); @@ -546,6 +546,30 @@ etgc_get_focus_column (ETableGroup *etg) return 0; } +static void +etgc_selected_row_foreach (ETableGroup *etg, + ETableForeachFunc func, + gpointer closure) +{ + ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); + if (etgc->children) { + GList *list; + for (list = etgc->children; list; list = list->next) { + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroup *child = child_node->child; + e_table_group_selected_row_foreach (child, func, closure); + } + } +} + + + + + + + + + static void etgc_thaw (ETableGroup *etg) { e_canvas_item_request_reflow (GNOME_CANVAS_ITEM(etg)); @@ -669,10 +693,11 @@ etgc_class_init (GtkObjectClass *object_class) e_group_class->increment = etgc_increment; e_group_class->row_count = etgc_row_count; e_group_class->set_focus = etgc_set_focus; - e_group_class->select_row = etgc_select_row; - e_group_class->get_selected_view_row = etgc_get_selected_view_row; + e_group_class->set_cursor_row = etgc_set_cursor_row; + e_group_class->get_cursor_row = etgc_get_cursor_row; e_group_class->get_focus_column = etgc_get_focus_column; e_group_class->get_printable = etgc_get_printable; + e_group_class->selected_row_foreach = etgc_selected_row_foreach; gtk_object_add_arg_type ("ETableGroupContainer::drawgrid", GTK_TYPE_BOOL, GTK_ARG_WRITABLE, ARG_TABLE_DRAW_GRID); |