aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table.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.c
parentdf398954171eb8e1acdeb9c890583521821f2984 (diff)
downloadgsoc2013-evolution-f9b79bb0f6f9f372539af46e26c93c1669762c79.tar.gz
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.c')
-rw-r--r--widgets/e-table/e-table.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c
index bf3aaa71cb..f6ad92e4c2 100644
--- a/widgets/e-table/e-table.c
+++ b/widgets/e-table/e-table.c
@@ -42,6 +42,7 @@ enum {
ROW_SELECTION,
CURSOR_CHANGE,
DOUBLE_CLICK,
+ KEY_PRESS,
LAST_SIGNAL
};
@@ -206,6 +207,16 @@ group_double_click (ETableGroup *etg, int row, ETable *et)
row);
}
+static gint
+group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et)
+{
+ int return_val;
+ gtk_signal_emit (GTK_OBJECT (et),
+ et_signals [DOUBLE_CLICK],
+ row, col, event, &return_val);
+ return return_val;
+}
+
static gboolean
changed_idle (gpointer data)
{
@@ -231,6 +242,8 @@ changed_idle (gpointer data)
GTK_SIGNAL_FUNC (group_cursor_change), et);
gtk_signal_connect (GTK_OBJECT (et->group), "double_click",
GTK_SIGNAL_FUNC (group_double_click), et);
+ gtk_signal_connect (GTK_OBJECT (et->group), "key_press",
+ GTK_SIGNAL_FUNC (group_key_press), et);
e_table_fill_table (et, et->model);
gtk_object_set (GTK_OBJECT (et->group),
@@ -315,6 +328,8 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
GTK_SIGNAL_FUNC(group_cursor_change), e_table);
gtk_signal_connect (GTK_OBJECT (e_table->group), "double_click",
GTK_SIGNAL_FUNC(group_double_click), e_table);
+ gtk_signal_connect (GTK_OBJECT (e_table->group), "key_press",
+ GTK_SIGNAL_FUNC(group_key_press), e_table);
e_table->table_model_change_id = gtk_signal_connect (
GTK_OBJECT (model), "model_changed",
@@ -729,6 +744,7 @@ e_table_class_init (GtkObjectClass *object_class)
klass->row_selection = NULL;
klass->cursor_change = NULL;
klass->double_click = NULL;
+ klass->key_press = NULL;
et_signals [ROW_SELECTION] =
gtk_signal_new ("row_selection",
@@ -753,6 +769,14 @@ e_table_class_init (GtkObjectClass *object_class)
GTK_SIGNAL_OFFSET (ETableClass, double_click),
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+
+ et_signals [DOUBLE_CLICK] =
+ gtk_signal_new ("key_press",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableClass, 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, et_signals, LAST_SIGNAL);