Make C-r also reload the current directory

This commit is contained in:
Přemysl Eric Janouch 2021-12-19 11:37:40 +01:00
parent 2c46ca262b
commit 56d623fe52
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 5 additions and 0 deletions

View File

@ -559,6 +559,10 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
case GDK_KEY_n: case GDK_KEY_n:
spawn_path(g.directory); spawn_path(g.directory);
return TRUE; return TRUE;
case GDK_KEY_r:
// TODO(p): Reload the image instead, if it's currently visible.
load_directory(NULL);
return TRUE;
case GDK_KEY_q: case GDK_KEY_q:
case GDK_KEY_w: case GDK_KEY_w:
gtk_widget_destroy(g.window); gtk_widget_destroy(g.window);
@ -594,6 +598,7 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
case GDK_KEY_F5: case GDK_KEY_F5:
case GDK_KEY_r: case GDK_KEY_r:
// TODO(p): See the comment for C-r above.
load_directory(NULL); load_directory(NULL);
return TRUE; return TRUE;