diff options
author | Federico Mena Quintero <federico@novell.com> | 2009-06-15 12:37:07 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@novell.com> | 2009-06-15 12:37:07 -0500 |
commit | 2b3de3dd75384a0af99f92656cdd70d72319ca6c (patch) | |
tree | dde4a3b3a9a60f23cab642e13e32a51ccfaa9798 /gtk/gtktreeprivate.h | |
parent | bc42bca9ddb6270681ead9289fe638d121d9a6c7 (diff) | |
download | gtk+-2b3de3dd75384a0af99f92656cdd70d72319ca6c.tar.gz |
bgo#580560 - Make Backspace work in the file chooser to to to the parent directory
GtkFileChooserDefault actually implements a binding signal for
Backspace, to make it go to the parent directory. However,
GtkTreeView was eating our Backspace, and thus the file chooser was
not getting a chance to execute its binding signal.
GtkTreeView implements a Backspace binding itself, which it uses to
move to the parent node of the current cursor node. However, the
binding handler would return TRUE even if there was no parent to the
current node. Now the binding handler only returns TRUE if it
actually changed the cursor.
Additionally, gtk_tree_view_key_press() sees if no bindings handled a
key press; in that case, it re-sends the key press to the treeview's
search entry. However, sending a Backspace to an empty entry makes
the entry beep. Thus, we add a flag that gets set from GtkTreeView's
Backspace binding handler, to tell gtk_tree_view_key_press() when it
should *not* re-emit the key press on the search entry. Sort of,
"yeah, I didn't handle this key press, but I don't want you to send it
to the search entry, either!".
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Diffstat (limited to 'gtk/gtktreeprivate.h')
-rw-r--r-- | gtk/gtktreeprivate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtktreeprivate.h b/gtk/gtktreeprivate.h index 384c176982..44259abe35 100644 --- a/gtk/gtktreeprivate.h +++ b/gtk/gtktreeprivate.h @@ -238,6 +238,8 @@ struct _GtkTreeViewPrivate guint post_validation_flag : 1; + /* Whether our key press handler is to avoid sending an unhandled binding to the search entry */ + guint search_entry_avoid_unhandled_binding : 1; /* Auto expand/collapse timeout in hover mode */ guint auto_expand_timeout; |