aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-09-08 03:04:29 +0800
committerChris Lahey <clahey@src.gnome.org>2001-09-08 03:04:29 +0800
commit109c5702bab44785c2fb7377245fe293ff5c169c (patch)
tree335d751b9b5865efb50803303517c9a1bcd19a71 /widgets/table
parent5b32dc6ffce9b556d04517695f79158c1962127f (diff)
downloadgsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.tar
gsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.tar.gz
gsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.tar.bz2
gsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.tar.lz
gsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.tar.xz
gsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.tar.zst
gsoc2013-evolution-109c5702bab44785c2fb7377245fe293ff5c169c.zip
Don't do_something on button_release if we did something on button_press.
2001-09-07 Christopher James Lahey <clahey@ximian.com> * e-table-item.c, e-table-item.h (eti_event): Don't do_something on button_release if we did something on button_press. Fixes Ximian bug #3742. svn path=/trunk/; revision=12680
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-item.c8
-rw-r--r--widgets/table/e-table-item.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 16b8db8277..cf89a61cda 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1194,6 +1194,8 @@ eti_init (GnomeCanvasItem *item)
eti->tooltip->background = NULL;
eti->tooltip->foreground = NULL;
+ eti->maybe_did_something = TRUE;
+
eti->grabbed_col = -1;
eti->grabbed_row = -1;
@@ -1764,7 +1766,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
"cursor_col", &cursor_col,
NULL);
- e_selection_model_maybe_do_something(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), button.state);
+ eti->maybe_did_something =
+ e_selection_model_maybe_do_something(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), button.state);
gtk_object_get(GTK_OBJECT(eti->selection),
"cursor_row", &new_cursor_row,
"cursor_col", &new_cursor_col,
@@ -1837,7 +1840,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (e->button.button == 1) {
if (eti->maybe_in_drag) {
eti->maybe_in_drag = FALSE;
- e_selection_model_do_something(E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
+ if (!eti->maybe_did_something)
+ e_selection_model_do_something(E_SELECTION_MODEL (eti->selection), eti->drag_row, eti->drag_col, eti->drag_state);
}
if (eti->in_drag) {
eti->in_drag = FALSE;
diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h
index efa55482ac..7cd9729833 100644
--- a/widgets/table/e-table-item.h
+++ b/widgets/table/e-table-item.h
@@ -74,6 +74,8 @@ typedef struct {
guint in_drag : 1;
guint grabbed : 1;
+ guint maybe_did_something : 1;
+
int drag_col;
int drag_row;
int drag_x;