From 5441932367ec2c7f07cffedf06bc0bcdbe2496fe Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 25 Oct 2000 18:59:25 +0000 Subject: Add "click" to the list of etable signals we proxy. * e-table-scrolled.c: Add "click" to the list of etable signals we proxy. svn path=/trunk/; revision=6170 --- widgets/table/e-table-scrolled.c | 22 ++++++++++++++++++++++ widgets/table/e-table-scrolled.h | 1 + 2 files changed, 23 insertions(+) (limited to 'widgets') diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c index 8946f25c25..ab490ad7b3 100644 --- a/widgets/table/e-table-scrolled.c +++ b/widgets/table/e-table-scrolled.c @@ -31,6 +31,7 @@ enum { CURSOR_CHANGE, DOUBLE_CLICK, RIGHT_CLICK, + CLICK, KEY_PRESS, LAST_SIGNAL }; @@ -72,6 +73,16 @@ right_click_proxy (ETable *et, int row, int col, GdkEvent *event, ETableScrolled return return_val; } +static gint +click_proxy (ETable *et, int row, int col, GdkEvent *event, ETableScrolled *ets) +{ + int return_val = 0; + gtk_signal_emit (GTK_OBJECT (ets), + ets_signals [CLICK], + row, col, event, &return_val); + return return_val; +} + static gint key_press_proxy (ETable *et, int row, int col, GdkEvent *event, ETableScrolled *ets) { @@ -114,6 +125,8 @@ e_table_scrolled_real_construct (ETableScrolled *ets) GTK_SIGNAL_FUNC(double_click_proxy), ets); gtk_signal_connect(GTK_OBJECT(ets->table), "right_click", GTK_SIGNAL_FUNC(right_click_proxy), ets); + gtk_signal_connect(GTK_OBJECT(ets->table), "click", + GTK_SIGNAL_FUNC(click_proxy), ets); gtk_signal_connect(GTK_OBJECT(ets->table), "key_press", GTK_SIGNAL_FUNC(key_press_proxy), ets); @@ -359,6 +372,7 @@ e_table_scrolled_class_init (GtkObjectClass *object_class) klass->cursor_change = NULL; klass->double_click = NULL; klass->right_click = NULL; + klass->click = NULL; klass->key_press = NULL; ets_signals [CURSOR_CHANGE] = @@ -385,6 +399,14 @@ e_table_scrolled_class_init (GtkObjectClass *object_class) e_marshal_INT__INT_INT_POINTER, GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + ets_signals [CLICK] = + gtk_signal_new ("click", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (ETableScrolledClass, click), + e_marshal_INT__INT_INT_POINTER, + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + ets_signals [KEY_PRESS] = gtk_signal_new ("key_press", GTK_RUN_LAST, diff --git a/widgets/table/e-table-scrolled.h b/widgets/table/e-table-scrolled.h index 4cce278a49..fca9c7cd98 100644 --- a/widgets/table/e-table-scrolled.h +++ b/widgets/table/e-table-scrolled.h @@ -28,6 +28,7 @@ typedef struct { void (*cursor_change) (ETableScrolled *est, int row); void (*double_click) (ETableScrolled *est, int row); gint (*right_click) (ETableScrolled *est, int row, int col, GdkEvent *event); + gint (*click) (ETableScrolled *est, int row, int col, GdkEvent *event); gint (*key_press) (ETableScrolled *est, int row, int col, GdkEvent *event); } ETableScrolledClass; -- cgit