aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-02 10:57:39 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-02 10:57:39 +0800
commitf9b79bb0f6f9f372539af46e26c93c1669762c79 (patch)
tree4c2bec08f2921cbfba3d079034820c17c201579c /widgets/e-table/e-table-item.c
parentdf398954171eb8e1acdeb9c890583521821f2984 (diff)
downloadgsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar
gsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar.gz
gsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar.bz2
gsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar.lz
gsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar.xz
gsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar.zst
gsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.zip
Added a "key_press" signal.
2000-06-01 Christopher James Lahey <clahey@helixcode.com> * e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h, e-table.c, e-table.h: Added a "key_press" signal. svn path=/trunk/; revision=3366
Diffstat (limited to 'widgets/e-table/e-table-item.c')
-rw-r--r--widgets/e-table/e-table-item.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index 90fcfdb7b1..592e69a4d3 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -20,6 +20,7 @@
#include "e-cell.h"
#include "e-util/e-canvas.h"
#include "e-util/e-canvas-utils.h"
+#include "e-util/e-util.h"
#define PARENT_OBJECT_TYPE gnome_canvas_item_get_type ()
@@ -31,6 +32,7 @@ enum {
ROW_SELECTION,
CURSOR_CHANGE,
DOUBLE_CLICK,
+ KEY_PRESS,
LAST_SIGNAL
};
@@ -1324,11 +1326,15 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (!(e->key.keyval >= 0x20 && e->key.keyval <= 0xff))
return_val = FALSE;
+ ecol = e_table_header_get_column (eti->header, eti->cursor_col);
+ ecell_view = eti->cell_views [eti->cursor_col];
+ e_cell_event (ecell_view, e, ecol->col_idx, eti->cursor_col, eti->cursor_row);
+
+ } else {
+ gtk_signal_emit (GTK_OBJECT (eti), eti_signals [KEY_PRESS],
+ eti->cursor_row, eti->cursor_col, e, &return_val);
}
- ecol = e_table_header_get_column (eti->header, eti->cursor_col);
- ecell_view = eti->cell_views [eti->cursor_col];
- e_cell_event (ecell_view, e, ecol->col_idx, eti->cursor_col, eti->cursor_row);
}
break;
@@ -1388,6 +1394,7 @@ eti_class_init (GtkObjectClass *object_class)
eti_class->row_selection = eti_row_selection;
eti_class->cursor_change = NULL;
eti_class->double_click = NULL;
+ eti_class->key_press = NULL;
gtk_object_add_arg_type ("ETableItem::ETableHeader", GTK_TYPE_OBJECT,
GTK_ARG_WRITABLE, ARG_TABLE_HEADER);
@@ -1437,6 +1444,14 @@ eti_class_init (GtkObjectClass *object_class)
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+ eti_signals [KEY_PRESS] =
+ gtk_signal_new ("key_press",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableItemClass, key_press),
+ e_marshal_INT__INT_INT_POINTER,
+ GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER);
+
gtk_object_class_add_signals (object_class, eti_signals, LAST_SIGNAL);
}