From 58d11ebbff902f0fd8dcc155840c1ab0e9e836ae Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Mon, 20 Dec 2021 09:58:17 +0100 Subject: Make M-Up go to the parent directory As in Windows Explorer and other software. --- fastiv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fastiv.c b/fastiv.c index 6d13def..4013a91 100644 --- a/fastiv.c +++ b/fastiv.c @@ -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: -- cgit v1.2.3-70-g09d2