Make M-Up go to the parent directory
As in Windows Explorer and other software.
This commit is contained in:
parent
1221325b3e
commit
58d11ebbff
8
fastiv.c
8
fastiv.c
@ -594,6 +594,14 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
|
|||||||
else
|
else
|
||||||
switch_to_view(g.path);
|
switch_to_view(g.path);
|
||||||
return TRUE;
|
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;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user