From e9dc381d3ace3404d0eafe94eb6da3b9a843abb8 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 17 Feb 2010 19:45:28 -0500 Subject: BugĀ 587014 - Magic space does not work as expected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neither ETree::key-press nor ETableItem::key-press signal definitions specify a GSignalAccumulator that terminates the signal emission when a handler returns TRUE, and Evolution 2.29 connects multiple handlers to ETree::key-press. When the space key is pressed, the first handler implements the magic space bar behavior and returns TRUE, which should terminate signal emission but doesn't because there's no accumulator function on the signal. So the second handler runs and checks for other keys besides space. It returns FALSE since it didn't handle the key press. End result: emission site gets back FALSE (from the second handler) as the return value, so it thinks the key press was not handled at all and invokes the fallback handler -- e_selection_model_toggle_single_row() -- which -unselects- the newly selected row, making it appear the next unread message was never selected. Several other ETable-related signals that return "handled" flags also lack GSignalAccumulator functions. I've made a note to myself to fix those as well. --- widgets/table/e-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/table/e-tree.h') diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index 5657751111..fa2ab787ce 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -66,7 +66,7 @@ typedef struct { 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); - gint (*key_press) (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); -- cgit