From bb52386b7da776c5692974b4c5cedbf5d2f46d4c Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 29 Oct 2001 23:06:57 +0000 Subject: Ignore buttons 4 and 5 here. Fixes Ximian bug #13853. 2001-10-29 Christopher James Lahey * e-table.c (et_canvas_root_event), e-tree.c (et_canvas_root_event): Ignore buttons 4 and 5 here. Fixes Ximian bug #13853. svn path=/trunk/; revision=14376 --- widgets/table/e-table.c | 14 ++++++++------ widgets/table/e-tree.c | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'widgets') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 0d860ac29b..22ea5b0660 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -729,12 +729,14 @@ et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETable *e_table) case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: case GDK_BUTTON_RELEASE: - if (GTK_WIDGET_HAS_FOCUS(root->canvas)) { - GnomeCanvasItem *item = GNOME_CANVAS(root->canvas)->focused_item; - - if (E_IS_TABLE_ITEM(item)) { - e_table_item_leave_edit_(E_TABLE_ITEM(item)); - return TRUE; + if (event->button.button != 4 && event->button.button != 5) { + if (GTK_WIDGET_HAS_FOCUS(root->canvas)) { + GnomeCanvasItem *item = GNOME_CANVAS(root->canvas)->focused_item; + + if (E_IS_TABLE_ITEM(item)) { + e_table_item_leave_edit_(E_TABLE_ITEM(item)); + return TRUE; + } } } break; diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 89bb65708d..24db734e2b 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -714,12 +714,14 @@ et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETree *e_tree) case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: case GDK_BUTTON_RELEASE: - if (GTK_WIDGET_HAS_FOCUS(root->canvas)) { - GnomeCanvasItem *item = GNOME_CANVAS(root->canvas)->focused_item; - - if (E_IS_TABLE_ITEM(item)) { - e_table_item_leave_edit_(E_TABLE_ITEM(item)); - return TRUE; + if (event->button.button != 4 && event->button.button != 5) { + if (GTK_WIDGET_HAS_FOCUS(root->canvas)) { + GnomeCanvasItem *item = GNOME_CANVAS(root->canvas)->focused_item; + + if (E_IS_TABLE_ITEM(item)) { + e_table_item_leave_edit_(E_TABLE_ITEM(item)); + return TRUE; + } } } break; -- cgit v1.2.3