aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-group-container.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-04 22:14:44 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-04 22:14:44 +0800
commit660a75cc995f416ecc018b6ee278582651240631 (patch)
tree072f90be0799fef5baf18e87383fbbd9155cf343 /widgets/table/e-table-group-container.c
parentce5a8e3224fad1c20760809198a508e28eeb4c04 (diff)
downloadgsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.tar
gsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.tar.gz
gsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.tar.bz2
gsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.tar.lz
gsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.tar.xz
gsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.tar.zst
gsoc2013-evolution-660a75cc995f416ecc018b6ee278582651240631.zip
Made drag events calculate a row and column and signal that information.
2000-08-04 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-item.h: Made drag events calculate a row and column and signal that information. * e-table-selection-model.c, e-table-selection-model.h: Changed do_something to take a GdkModifierType. svn path=/trunk/; revision=4529
Diffstat (limited to 'widgets/table/e-table-group-container.c')
-rw-r--r--widgets/table/e-table-group-container.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index f3788f154f..dbf492d091 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -542,6 +542,31 @@ etgc_get_focus_column (ETableGroup *etg)
return 0;
}
+static void
+etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
+{
+ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
+
+ if (row)
+ *row = -1;
+ if (col)
+ *col = -1;
+
+ *x -= GROUP_INDENT;
+ *y -= TITLE_HEIGHT;
+
+ if (*x >= 0 && *y >= 0 && 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_compute_location (child, x, y, row, col);
+ if ((*row != -1) && (*col != -1))
+ return;
+ }
+ }
+}
static void etgc_thaw (ETableGroup *etg)
{
@@ -684,6 +709,7 @@ etgc_class_init (GtkObjectClass *object_class)
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->compute_location = etgc_compute_location;
gtk_object_add_arg_type ("ETableGroupContainer::drawgrid", GTK_TYPE_BOOL,
GTK_ARG_WRITABLE, ARG_TABLE_DRAW_GRID);