diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-12-20 09:58:17 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-12-20 09:58:41 +0100 |
commit | 58d11ebbff902f0fd8dcc155840c1ab0e9e836ae (patch) | |
tree | 9af1b9c108d168b133f93b087b476d0442c1c8a0 | |
parent | 1221325b3e2018e14f098f21b9851e97e931d835 (diff) | |
download | fiv-58d11ebbff902f0fd8dcc155840c1ab0e9e836ae.tar.gz fiv-58d11ebbff902f0fd8dcc155840c1ab0e9e836ae.tar.xz fiv-58d11ebbff902f0fd8dcc155840c1ab0e9e836ae.zip |
Make M-Up go to the parent directory
As in Windows Explorer and other software.
-rw-r--r-- | fastiv.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -594,6 +594,14 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event, else switch_to_view(g.path); return TRUE; + case GDK_KEY_Up: + if (gtk_stack_get_visible_child(GTK_STACK(g.stack)) != g.view_box) { + // This isn't exact, trailing slashes should be ignored. + gchar *parent = g_path_get_dirname(g.directory); + load_directory(parent); + g_free(parent); + } + return TRUE; } break; case 0: |