From 3649d5dc6d7279d6c218d241232dea73c5c773d2 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 29 Jun 2000 19:22:24 +0000 Subject: From mail: 2000-06-29 Christopher James Lahey * 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 * 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 --- widgets/e-table/e-table-group.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'widgets/e-table/e-table-group.c') diff --git a/widgets/e-table/e-table-group.c b/widgets/e-table/e-table-group.c index 98ac040037..18f8084b2c 100644 --- a/widgets/e-table/e-table-group.c +++ b/widgets/e-table/e-table-group.c @@ -18,9 +18,6 @@ #include #include "e-util/e-util.h" -#define TITLE_HEIGHT 16 -#define GROUP_INDENT 10 - #define PARENT_TYPE gnome_canvas_group_get_type () #define ETG_CLASS(e) (E_TABLE_GROUP_CLASS(GTK_OBJECT(e)->klass)) @@ -172,24 +169,24 @@ e_table_group_set_focus (ETableGroup *etg, } void -e_table_group_select_row (ETableGroup *etg, - gint row) +e_table_group_set_cursor_row (ETableGroup *etg, + gint row) { g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - if (ETG_CLASS (etg)->select_row) - ETG_CLASS (etg)->select_row (etg, row); + if (ETG_CLASS (etg)->set_cursor_row) + ETG_CLASS (etg)->set_cursor_row (etg, row); } int -e_table_group_get_selected_view_row (ETableGroup *etg) +e_table_group_get_cursor_row (ETableGroup *etg) { g_return_val_if_fail (etg != NULL, -1); g_return_val_if_fail (E_IS_TABLE_GROUP (etg), -1); - if (ETG_CLASS (etg)->get_selected_view_row) - return ETG_CLASS (etg)->get_selected_view_row (etg); + if (ETG_CLASS (etg)->get_cursor_row) + return ETG_CLASS (etg)->get_cursor_row (etg); else return -1; } @@ -242,6 +239,20 @@ e_table_group_get_printable (ETableGroup *etg) return NULL; } +void +e_table_group_selected_row_foreach (ETableGroup *etg, + ETableForeachFunc func, + gpointer closure) +{ + g_return_if_fail (etg != NULL); + g_return_if_fail (E_IS_TABLE_GROUP (etg)); + + if (ETG_CLASS (etg)->selected_row_foreach) + ETG_CLASS (etg)->selected_row_foreach (etg, func, closure); +} + + + void e_table_group_row_selection (ETableGroup *e_table_group, gint row, gboolean selected) { @@ -366,11 +377,12 @@ etg_class_init (GtkObjectClass *object_class) klass->row_count = NULL; klass->increment = NULL; klass->set_focus = NULL; - klass->select_row = NULL; - klass->get_selected_view_row = NULL; + klass->set_cursor_row = NULL; + klass->get_cursor_row = NULL; klass->get_focus = etg_get_focus; klass->get_ecol = NULL; klass->get_printable = NULL; + klass->selected_row_foreach = NULL; etg_parent_class = gtk_type_class (PARENT_TYPE); -- cgit v1.2.3