aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-20 09:58:17 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-20 09:58:41 +0100
commit58d11ebbff902f0fd8dcc155840c1ab0e9e836ae (patch)
tree9af1b9c108d168b133f93b087b476d0442c1c8a0
parent1221325b3e2018e14f098f21b9851e97e931d835 (diff)
downloadfiv-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.c8
1 files changed, 8 insertions, 0 deletions
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: