Skip to content
  • Federico Mena Quintero's avatar
    bgo#580560 - Make Backspace work in the file chooser to to to the parent directory · 2b3de3dd
    Federico Mena Quintero authored
    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 en...
    2b3de3dd