aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2002-09-18 02:27:50 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-09-18 02:27:50 +0800
commitd4aa28c5e2ca9a535080e834de0dac7c6fd71849 (patch)
tree1c24b30c635157c07cccb4b626a186b7b7526aec
parent3d1b5c1a2e3d8d90e0f9dd713a434eb8ca388bfd (diff)
downloadgsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.tar
gsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.tar.gz
gsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.tar.bz2
gsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.tar.lz
gsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.tar.xz
gsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.tar.zst
gsoc2013-evolution-d4aa28c5e2ca9a535080e834de0dac7c6fd71849.zip
exit editing on dblclick. ungrab based on grabbed_count. unset grabbed_col
2002-09-17 Mike Kestner <mkestner@ximian.com> * gal/e-table/e-table-item.c (eti_event): exit editing on dblclick. ungrab based on grabbed_count. unset grabbed_col and grabbed_row on ungrab. svn path=/trunk/; revision=18089
-rw-r--r--widgets/table/e-table-item.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index ef8d903120..8b1349e666 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -218,6 +218,8 @@ eti_ungrab (ETableItem *eti, guint32 time)
eti->gtk_grabbed = FALSE;
}
gnome_canvas_item_ungrab(item, time);
+ eti->grabbed_col = -1;
+ eti->grabbed_row = -1;
}
}
}
@@ -1689,8 +1691,7 @@ eti_unrealize (GnomeCanvasItem *item)
{
ETableItem *eti = E_TABLE_ITEM (item);
- if (eti->grabbed) {
- eti->grabbed = FALSE;
+ if (eti->grabbed_count > 0) {
d(g_print ("%s: eti_ungrab\n", __FUNCTION__));
eti_ungrab (eti, -1);
}
@@ -2308,7 +2309,6 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti->drag_x = realx;
eti->drag_y = realy;
eti->drag_state = e->button.state;
- eti->grabbed = TRUE;
d(g_print ("%s: eti_grab\n", __FUNCTION__));
eti_grab (eti, e->button.time);
}
@@ -2343,10 +2343,9 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
d(g_print("%s: GDK_BUTTON_RELEASE received, button %d\n", __FUNCTION__, e->button.button));
- if (eti->grabbed) {
+ if (eti->grabbed_count > 0) {
d(g_print ("%s: eti_ungrab\n", __FUNCTION__));
eti_ungrab (eti, e->button.time);
- eti->grabbed = FALSE;
}
if (e->button.button == 1) {
@@ -2469,12 +2468,14 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->in_drag) {
eti->in_drag = FALSE;
}
+ if (eti_editing (eti))
+ e_table_item_leave_edit_ (eti);
+
}
- if (eti->grabbed) {
+ if (eti->grabbed_count > 0) {
d(g_print ("%s: eti_ungrab\n", __FUNCTION__));
eti_ungrab (eti, e->button.time);
- eti->grabbed = FALSE;
}
if (model_row != -1 && model_col != -1) {