aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-25 06:41:13 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-25 06:41:13 +0800
commitf1172ec0fd7fbff4ce4807ab058055e00faad3db (patch)
treea021a179f6703d362408cbbc2b1f7bc7e5469186 /widgets/table/e-table.c
parent4d261c55e56314bd629db70cece3b378a92c2b76 (diff)
downloadgsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.tar
gsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.tar.gz
gsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.tar.bz2
gsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.tar.lz
gsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.tar.xz
gsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.tar.zst
gsoc2013-evolution-f1172ec0fd7fbff4ce4807ab058055e00faad3db.zip
Added #include "gal/widgets/e-unicode.h".
2001-10-24 Christopher James Lahey <clahey@ximian.com> * e-cell-combo.c: Added #include "gal/widgets/e-unicode.h". * e-cell-text.c: Added lots of deactivated debugging printfs here. (ect_event): Fixed the flags check here. Set edit->actions to 0 before calling e_text_event_processor_handle_event. * e-table-item.c, e-table-item.h: Use eti_grab and eti_ungrab all over the place. Added lots and lots of deactivated debugging printfs here. (eti_grab, eti_ungrab): New functions to encapsulate grabbing and ungrabbing the cursor and to allow for recursive grabs (refcounting style.) * e-table.c: Added deactivated debugging printfs here. (et_canvas_root_event): Attach to the event handler on the root canvas item instead of the canvas itself when making the ETable leave editing state. Fixes Ximian bug #9737. svn path=/trunk/; revision=14072
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 7cc6a215ef..add74d030b 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -41,6 +41,14 @@
#define PARENT_TYPE gtk_table_get_type ()
+#define d(x)
+
+#if d(!)0
+#define e_table_item_leave_edit_(x) (e_table_item_leave_edit((x)), g_print ("%s: e_table_item_leave_edit\n", __FUNCTION__))
+#else
+#define e_table_item_leave_edit_(x) (e_table_item_leave_edit((x)))
+#endif
+
static GtkObjectClass *e_table_parent_class;
enum {
@@ -701,14 +709,23 @@ et_canvas_realize (GtkWidget *canvas, ETable *e_table)
}
static gint
-et_canvas_button_press (GtkWidget *canvas, GdkEventButton *event, ETable *e_table)
-{
- if (GTK_WIDGET_HAS_FOCUS(canvas)) {
- GnomeCanvasItem *item = GNOME_CANVAS(canvas)->focused_item;
-
- if (E_IS_TABLE_ITEM(item)) {
- e_table_item_leave_edit(E_TABLE_ITEM(item));
+et_canvas_root_event (GnomeCanvasItem *root, GdkEvent *event, ETable *e_table)
+{
+ switch (event->type) {
+ 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;
+ }
}
+ break;
+ default:
+ break;
}
return FALSE;
@@ -774,8 +791,8 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
GTK_OBJECT(e_table->table_canvas), "realize",
GTK_SIGNAL_FUNC(et_canvas_realize), e_table);
gtk_signal_connect (
- GTK_OBJECT(e_table->table_canvas), "button_press_event",
- GTK_SIGNAL_FUNC(et_canvas_button_press), e_table);
+ GTK_OBJECT(gnome_canvas_root (e_table->table_canvas)), "event",
+ GTK_SIGNAL_FUNC(et_canvas_root_event), e_table);
e_table->canvas_vbox = gnome_canvas_item_new(
gnome_canvas_root(e_table->table_canvas),
e_canvas_vbox_get_type(),