aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-group-container.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-02 08:18:00 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-02 08:18:00 +0800
commit0a898d1c96145bcc37fef5dad685f8c47bd98189 (patch)
tree8c31740349faf59f9fe4d6736171798bc350f036 /widgets/e-table/e-table-group-container.c
parentf4eed74cbc66265957f938f13f1baa15e76c421e (diff)
downloadgsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.tar
gsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.tar.gz
gsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.tar.bz2
gsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.tar.lz
gsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.tar.xz
gsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.tar.zst
gsoc2013-evolution-0a898d1c96145bcc37fef5dad685f8c47bd98189.zip
Added e_table_get_selected_view_row.
2000-06-01 Christopher James Lahey <clahey@helixcode.com> * e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-group.h, e-table-item.c, e-table.c, e-table.h: Added e_table_get_selected_view_row. svn path=/trunk/; revision=3351
Diffstat (limited to 'widgets/e-table/e-table-group-container.c')
-rw-r--r--widgets/e-table/e-table-group-container.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/widgets/e-table/e-table-group-container.c b/widgets/e-table/e-table-group-container.c
index 900edb023f..04ddb011c1 100644
--- a/widgets/e-table/e-table-group-container.c
+++ b/widgets/e-table/e-table-group-container.c
@@ -469,6 +469,22 @@ etgc_select_row (ETableGroup *etg, gint row)
}
}
+static int
+etgc_get_selected_view_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);
+ if (row != -1)
+ return count + row;
+ count += e_table_group_row_count(group);
+ }
+ return -1;
+}
+
static void
etgc_set_focus (ETableGroup *etg, EFocus direction, gint view_col)
{
@@ -633,6 +649,7 @@ etgc_class_init (GtkObjectClass *object_class)
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->unfocus = etgc_unfocus;
e_group_class->get_focus_column = etgc_get_focus_column;