diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-02-19 00:48:37 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-02-19 00:48:37 +0800 |
commit | 29a48cb2cee59ddb42c6afb7f87a01e6a37a9895 (patch) | |
tree | 123d5303c58995f8be0a7da273780eac29b3b3f5 | |
parent | e9dc381d3ace3404d0eafe94eb6da3b9a843abb8 (diff) | |
download | gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.tar gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.tar.gz gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.tar.bz2 gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.tar.lz gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.tar.xz gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.tar.zst gsoc2013-evolution-29a48cb2cee59ddb42c6afb7f87a01e6a37a9895.zip |
Fix ETable/ETree signal signatures.
To avoid another case like bug #587014, add GSignalAccumulator functions
to all ETable and ETree signals that return a flag to indicate the signal
has been handled.
See commit e9dc381d3ace3404d0eafe94eb6da3b9a843abb8 for an example of
the kind of problems not having a GSignalAccumulator can cause.
Signals changed:
ETree::click
ETree::right-click
ETree::white-space-event
ETable::click
ETable::key-press
ETable::right-click
ETable::start-drag
ETable::white-space-event
ETableItem::click
ETableItem::right-click
ETableItem::start-drag
ETableGroup::click
ETableGroup::key-press
ETableGroup::right-click
ETableGroup::start-drag
-rw-r--r-- | e-util/e-marshal.list | 2 | ||||
-rw-r--r-- | widgets/table/e-table-group-container.c | 8 | ||||
-rw-r--r-- | widgets/table/e-table-group-leaf.c | 14 | ||||
-rw-r--r-- | widgets/table/e-table-group.c | 57 | ||||
-rw-r--r-- | widgets/table/e-table-group.h | 12 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 22 | ||||
-rw-r--r-- | widgets/table/e-table-item.h | 6 | ||||
-rw-r--r-- | widgets/table/e-table.c | 50 | ||||
-rw-r--r-- | widgets/table/e-table.h | 10 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 30 | ||||
-rw-r--r-- | widgets/table/e-tree.h | 10 |
11 files changed, 112 insertions, 109 deletions
diff --git a/e-util/e-marshal.list b/e-util/e-marshal.list index 6b70a9e3fe..823005bac8 100644 --- a/e-util/e-marshal.list +++ b/e-util/e-marshal.list @@ -1,3 +1,4 @@ +BOOLEAN:BOXED BOOLEAN:BOXED,STRING BOOLEAN:BOXED,POINTER,POINTER BOOLEAN:INT,INT,BOXED @@ -6,6 +7,7 @@ BOOLEAN:INT,POINTER,INT,BOXED BOOLEAN:INT,POINTER,INT,OBJECT,INT,INT,UINT BOOLEAN:NONE BOOLEAN:OBJECT,DOUBLE,DOUBLE,BOOLEAN +BOOLEAN:POINTER BOOLEAN:POINTER,BOOLEAN,POINTER BOOLEAN:POINTER,POINTER BOOLEAN:POINTER,POINTER,POINTER,POINTER diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 77d766b16e..810823db61 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -378,28 +378,28 @@ child_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, e_table_group_double_click (E_TABLE_GROUP (etgc), row, col, event); } -static gint +static gboolean child_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_right_click (E_TABLE_GROUP (etgc), row, col, event); } -static gint +static gboolean child_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_click (E_TABLE_GROUP (etgc), row, col, event); } -static gint +static gboolean child_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_key_press (E_TABLE_GROUP (etgc), row, col, event); } -static gint +static gboolean child_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 61d357aaf2..1748d3e509 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -186,7 +186,7 @@ etgl_double_click (GtkObject *object, gint model_row, gint model_col, GdkEvent * e_table_group_double_click (E_TABLE_GROUP(etgl), model_row, model_col, event); } -static gint +static gboolean etgl_key_press (GtkObject *object, gint row, gint col, GdkEvent *event, ETableGroupLeaf *etgl) { if (row < E_TABLE_SUBSET(etgl->ets)->n_map && row >= 0) @@ -195,17 +195,17 @@ etgl_key_press (GtkObject *object, gint row, gint col, GdkEvent *event, ETableGr col, event); else - return 0; + return FALSE; } -static gint +static gboolean etgl_start_drag (GtkObject *object, gint model_row, gint model_col, GdkEvent *event, ETableGroupLeaf *etgl) { return e_table_group_start_drag (E_TABLE_GROUP(etgl), model_row, model_col, event); } -static gint +static gboolean etgl_right_click (GtkObject *object, gint view_row, gint model_col, GdkEvent *event, ETableGroupLeaf *etgl) { @@ -215,10 +215,10 @@ etgl_right_click (GtkObject *object, gint view_row, gint model_col, GdkEvent *ev model_col, event); else - return 0; + return FALSE; } -static gint +static gboolean etgl_click (GtkObject *object, gint row, gint col, GdkEvent *event, ETableGroupLeaf *etgl) { if (row < E_TABLE_SUBSET(etgl->ets)->n_map) @@ -227,7 +227,7 @@ etgl_click (GtkObject *object, gint row, gint col, GdkEvent *event, ETableGroupL col, event); else - return 0; + return FALSE; } static void diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index aae71bcc06..4189ae6015 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -495,16 +495,16 @@ e_table_group_double_click (ETableGroup *e_table_group, * * This routine emits the "right_click" signal. */ -gint +gboolean e_table_group_right_click (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event) { - gint return_val = 0; + gboolean return_val = FALSE; - g_return_val_if_fail (e_table_group != NULL, 0); - g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), 0); + g_return_val_if_fail (e_table_group != NULL, FALSE); + g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE); g_signal_emit (e_table_group, etg_signals [RIGHT_CLICK], 0, @@ -522,16 +522,16 @@ e_table_group_right_click (ETableGroup *e_table_group, * * This routine emits the "click" signal. */ -gint +gboolean e_table_group_click (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event) { - gint return_val = 0; + gboolean return_val = FALSE; - g_return_val_if_fail (e_table_group != NULL, 0); - g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), 0); + g_return_val_if_fail (e_table_group != NULL, FALSE); + g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE); g_signal_emit (e_table_group, etg_signals [CLICK], 0, @@ -549,16 +549,16 @@ e_table_group_click (ETableGroup *e_table_group, * * This routine emits the "key_press" signal. */ -gint +gboolean e_table_group_key_press (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event) { - gint return_val = 0; + gboolean return_val = FALSE; - g_return_val_if_fail (e_table_group != NULL, 0); - g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), 0); + g_return_val_if_fail (e_table_group != NULL, FALSE); + g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE); g_signal_emit (e_table_group, etg_signals [KEY_PRESS], 0, @@ -576,16 +576,16 @@ e_table_group_key_press (ETableGroup *e_table_group, * * This routine emits the "start_drag" signal. */ -gint +gboolean e_table_group_start_drag (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event) { - gint return_val = 0; + gboolean return_val = FALSE; - g_return_val_if_fail (e_table_group != NULL, 0); - g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), 0); + g_return_val_if_fail (e_table_group != NULL, FALSE); + g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE); g_signal_emit (e_table_group, etg_signals [START_DRAG], 0, @@ -706,18 +706,19 @@ etg_class_init (ETableGroupClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableGroupClass, right_click), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, + G_TYPE_INT, GDK_TYPE_EVENT); etg_signals [CLICK] = g_signal_new ("click", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableGroupClass, click), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); etg_signals [KEY_PRESS] = @@ -725,9 +726,9 @@ etg_class_init (ETableGroupClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableGroupClass, key_press), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); etg_signals [START_DRAG] = @@ -735,9 +736,9 @@ etg_class_init (ETableGroupClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableGroupClass, start_drag), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); } diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h index 7bf139e666..7ac1a243e8 100644 --- a/widgets/table/e-table-group.h +++ b/widgets/table/e-table-group.h @@ -72,9 +72,9 @@ typedef struct { void (*cursor_change) (ETableGroup *etg, gint row); void (*cursor_activated) (ETableGroup *etg, gint row); void (*double_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); - gint (*right_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); - gint (*click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); - gint (*key_press) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gboolean (*right_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gboolean (*click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gboolean (*key_press) (ETableGroup *etg, gint row, gint col, GdkEvent *event); gint (*start_drag) (ETableGroup *etg, gint row, gint col, GdkEvent *event); /* Virtual functions. */ @@ -154,15 +154,15 @@ void e_table_group_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event); -gint e_table_group_right_click (ETableGroup *etg, +gboolean e_table_group_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event); -gint e_table_group_click (ETableGroup *etg, +gboolean e_table_group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event); -gint e_table_group_key_press (ETableGroup *etg, +gboolean e_table_group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event); diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 8fa9e2ad4e..06e847f40e 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -2154,7 +2154,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) { ETableItem *eti = E_TABLE_ITEM (item); ECellView *ecell_view; - gint return_val = TRUE; + gboolean return_val = TRUE; #if d(!)0 gboolean leave = FALSE; #endif @@ -2430,7 +2430,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) if (eti->maybe_in_drag) { if (abs (e->motion.x - eti->drag_x) >= 3 || abs (e->motion.y - eti->drag_y) >= 3) { - gint drag_handled; + gboolean drag_handled; eti->maybe_in_drag = 0; g_signal_emit (eti, eti_signals [START_DRAG], 0, @@ -2934,9 +2934,9 @@ eti_class_init (ETableItemClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableItemClass, start_drag), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); eti_signals [RIGHT_CLICK] = @@ -2944,9 +2944,9 @@ eti_class_init (ETableItemClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableItemClass, right_click), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); eti_signals [CLICK] = @@ -2954,9 +2954,9 @@ eti_class_init (ETableItemClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableItemClass, click), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); eti_signals [KEY_PRESS] = diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h index 15415ff88d..e99fa29194 100644 --- a/widgets/table/e-table-item.h +++ b/widgets/table/e-table-item.h @@ -166,10 +166,10 @@ typedef struct { void (*cursor_change) (ETableItem *eti, gint row); void (*cursor_activated) (ETableItem *eti, gint row); void (*double_click) (ETableItem *eti, gint row, gint col, GdkEvent *event); - gint (*right_click) (ETableItem *eti, gint row, gint col, GdkEvent *event); - gint (*click) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gboolean (*right_click) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gboolean (*click) (ETableItem *eti, gint row, gint col, GdkEvent *event); gboolean (*key_press) (ETableItem *eti, gint row, gint col, GdkEvent *event); - gint (*start_drag) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gboolean (*start_drag) (ETableItem *eti, gint row, gint col, GdkEvent *event); void (*style_set) (ETableItem *eti, GtkStyle *previous_style); void (*selection_model_removed) (ETableItem *eti, ESelectionModel *selection); void (*selection_model_added) (ETableItem *eti, ESelectionModel *selection); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 8d2f195fa6..fe8b48e88b 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -780,26 +780,26 @@ group_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETabl g_signal_emit (G_OBJECT (et), et_signals [DOUBLE_CLICK], 0, row, col, event); } -static gint +static gboolean group_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - gint return_val = 0; + gboolean return_val = FALSE; g_signal_emit (G_OBJECT (et), et_signals [RIGHT_CLICK], 0, row, col, event, &return_val); return return_val; } -static gint +static gboolean group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - gint return_val = 0; + gboolean return_val = 0; g_signal_emit (G_OBJECT (et), et_signals [CLICK], 0, row, col, event, &return_val); return return_val; } -static gint +static gboolean group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - gint return_val = 0; + gboolean return_val = FALSE; GdkEventKey *key = (GdkEventKey *) event; gint y, row_local, col_local; GtkAdjustment *vadj; @@ -854,10 +854,10 @@ group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable * return return_val; } -static gint +static gboolean group_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - gint return_val = 0; + gboolean return_val = TRUE; g_signal_emit (G_OBJECT (et), et_signals [START_DRAG], 0, row, col, event, &return_val); return return_val; @@ -1034,10 +1034,10 @@ et_canvas_realize (GtkWidget *canvas, ETable *e_table) set_header_width (e_table); } -static gint +static gboolean white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETable *e_table) { - gint return_val = 0; + gboolean return_val = 0; g_signal_emit (GTK_OBJECT (e_table), et_signals [WHITE_SPACE_EVENT], 0, event, &return_val); return return_val; @@ -3157,9 +3157,9 @@ e_table_class_init (ETableClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, right_click), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); et_signals [CLICK] = @@ -3167,9 +3167,9 @@ e_table_class_init (ETableClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, click), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); et_signals [KEY_PRESS] = @@ -3177,9 +3177,9 @@ e_table_class_init (ETableClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, key_press), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); et_signals [START_DRAG] = @@ -3187,9 +3187,9 @@ e_table_class_init (ETableClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, start_drag), - NULL, NULL, - e_marshal_INT__INT_INT_BOXED, - G_TYPE_INT, 3, G_TYPE_INT, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_INT_BOXED, + G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); et_signals [STATE_CHANGE] = @@ -3206,9 +3206,9 @@ e_table_class_init (ETableClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, white_space_event), - NULL, NULL, - e_marshal_INT__BOXED, - G_TYPE_INT, 1, GDK_TYPE_EVENT); + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__BOXED, + G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT); et_signals[TABLE_DRAG_BEGIN] = g_signal_new ("table_drag_begin", diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h index e1537babc9..1c20b2d12b 100644 --- a/widgets/table/e-table.h +++ b/widgets/table/e-table.h @@ -163,12 +163,12 @@ typedef struct { void (*cursor_activated) (ETable *et, gint row); void (*selection_change) (ETable *et); void (*double_click) (ETable *et, gint row, gint col, GdkEvent *event); - gint (*right_click) (ETable *et, gint row, gint col, GdkEvent *event); - gint (*click) (ETable *et, gint row, gint col, GdkEvent *event); - gint (*key_press) (ETable *et, gint row, gint col, GdkEvent *event); - gint (*start_drag) (ETable *et, gint row, gint col, GdkEvent *event); + gboolean (*right_click) (ETable *et, gint row, gint col, GdkEvent *event); + gboolean (*click) (ETable *et, gint row, gint col, GdkEvent *event); + gboolean (*key_press) (ETable *et, gint row, gint col, GdkEvent *event); + gboolean (*start_drag) (ETable *et, gint row, gint col, GdkEvent *event); void (*state_change) (ETable *et); - gint (*white_space_event) (ETable *et, GdkEvent *event); + gboolean (*white_space_event) (ETable *et, GdkEvent *event); void (*set_scroll_adjustments) (ETable *table, GtkAdjustment *hadjustment, diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index ddfb85abe8..783d17491a 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -852,10 +852,10 @@ item_double_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree * row, path, col, event); } -static gint +static gboolean item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { - gint return_val = 0; + gboolean return_val = 0; ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, et_signals [RIGHT_CLICK], 0, @@ -863,10 +863,10 @@ item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *e return return_val; } -static gint +static gboolean item_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { - gint return_val = 0; + gboolean return_val = 0; ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, et_signals [CLICK], 0, @@ -1035,10 +1035,10 @@ et_canvas_style_set (GtkWidget *widget, GtkStyle *prev_style) NULL); } -static gint +static gboolean white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETree *e_tree) { - gint return_val = 0; + gboolean return_val = 0; g_signal_emit (e_tree, et_signals [WHITE_SPACE_EVENT], 0, event, &return_val); @@ -3181,9 +3181,9 @@ e_tree_class_init (ETreeClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETreeClass, right_click), - NULL, NULL, - e_marshal_INT__INT_POINTER_INT_BOXED, - G_TYPE_INT, 4, G_TYPE_INT, G_TYPE_POINTER, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_POINTER_INT_BOXED, + G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_POINTER, G_TYPE_INT, GDK_TYPE_EVENT); et_signals [CLICK] = @@ -3191,9 +3191,9 @@ e_tree_class_init (ETreeClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETreeClass, click), - NULL, NULL, - e_marshal_INT__INT_POINTER_INT_BOXED, - G_TYPE_INT, 4, G_TYPE_INT, G_TYPE_POINTER, + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__INT_POINTER_INT_BOXED, + G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_POINTER, G_TYPE_INT, GDK_TYPE_EVENT); et_signals [KEY_PRESS] = @@ -3230,9 +3230,9 @@ e_tree_class_init (ETreeClass *class) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETreeClass, white_space_event), - NULL, NULL, - e_marshal_INT__POINTER, - G_TYPE_INT, 1, GDK_TYPE_EVENT); + g_signal_accumulator_true_handled, NULL, + e_marshal_BOOLEAN__POINTER, + G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT); et_signals[TREE_DRAG_BEGIN] = g_signal_new ("tree_drag_begin", diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index fa2ab787ce..968f6bef38 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -64,12 +64,12 @@ typedef struct { void (*cursor_activated) (ETree *et, gint row, ETreePath path); void (*selection_change) (ETree *et); void (*double_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); - gint (*right_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); - gint (*click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + gboolean (*right_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + gboolean (*click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); gboolean (*key_press) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); - gint (*start_drag) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); - gint (*state_change) (ETree *et); - gint (*white_space_event) (ETree *et, GdkEvent *event); + gboolean (*start_drag) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + void (*state_change) (ETree *et); + gboolean (*white_space_event) (ETree *et, GdkEvent *event); void (*set_scroll_adjustments) (ETree *tree, GtkAdjustment *hadjustment, |