aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-04 17:26:17 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-04 17:26:17 +0800
commitddc0dc65f57f8a01f2744becf35a08eb4ef8e848 (patch)
tree67ed125e572cd3199c35253adadf7a8457dae382 /widgets
parentcf787e7c58df849c97c429b79c992033eca5cf0e (diff)
downloadgsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.tar
gsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.tar.gz
gsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.tar.bz2
gsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.tar.lz
gsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.tar.xz
gsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.tar.zst
gsoc2013-evolution-ddc0dc65f57f8a01f2744becf35a08eb4ef8e848.zip
revert last patch. (eti_attach_cell_views): add some code to reset drags
2004-05-04 Not Zed <NotZed@Ximian.com> * e-table-item.c (eti_event): revert last patch. (eti_attach_cell_views): add some code to reset drags and other things as if the model changed, so we don't keep trying to run things we shouldn't be on the view which might be changing. This may break other things but should fix 57222 and related. svn path=/trunk/; revision=25779
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-item.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 8a9956a614..6e3ef8ddf1 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -60,6 +60,9 @@
#define e_table_item_leave_edit_(x) (e_table_item_leave_edit((x)))
#endif
+static void eti_check_cursor_bounds (ETableItem *eti);
+static void eti_cancel_drag_due_to_model_change (ETableItem *eti);
+
/* FIXME: Do an analysis of which cell functions are needed before
realize and make sure that all of them are doable by all the cells
and that all of the others are only done after realization. */
@@ -354,6 +357,14 @@ eti_attach_cell_views (ETableItem *eti)
g_assert (eti->header);
g_assert (eti->table_model);
+ /* this is just c&p from model pre change, but it fixes things */
+ eti_cancel_drag_due_to_model_change (eti);
+ eti_check_cursor_bounds (eti);
+ if (eti_editing (eti))
+ e_table_item_leave_edit_(eti);
+ eti->motion_row = -1;
+ eti->motion_col = -1;
+
/*
* Now realize the various ECells
*/
@@ -2551,8 +2562,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return TRUE;
if (eti->motion_row != -1 && eti->motion_col != -1 &&
- (row != eti->motion_row || col != eti->motion_col)
- && eti->motion_col < eti->n_cells) {
+ (row != eti->motion_row || col != eti->motion_col)) {
GdkEvent *cross = gdk_event_new (GDK_LEAVE_NOTIFY);
cross->crossing.time = e->motion.time;
return_val = eti_e_cell_event (eti, eti->cell_views [eti->motion_col],