Bind F5 and r to refreshing the directory
This commit is contained in:
parent
f8526d486a
commit
411f0b3e91
10
fastiv.c
10
fastiv.c
@ -275,9 +275,11 @@ on_open_location(G_GNUC_UNUSED GtkPlacesSidebar *sidebar, GFile *location,
|
|||||||
G_GNUC_UNUSED GtkPlacesOpenFlags flags, G_GNUC_UNUSED gpointer user_data)
|
G_GNUC_UNUSED GtkPlacesOpenFlags flags, G_GNUC_UNUSED gpointer user_data)
|
||||||
{
|
{
|
||||||
gchar *path = g_file_get_path(location);
|
gchar *path = g_file_get_path(location);
|
||||||
|
if (path) {
|
||||||
load_directory(path);
|
load_directory(path);
|
||||||
g_free(path);
|
g_free(path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Cursor keys, e.g., simply cannot be bound through accelerators
|
// Cursor keys, e.g., simply cannot be bound through accelerators
|
||||||
// (and GtkWidget::keynav-failed would arguably be an awful solution).
|
// (and GtkWidget::keynav-failed would arguably be an awful solution).
|
||||||
@ -321,6 +323,14 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
|
|||||||
on_open();
|
on_open();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
case GDK_KEY_F5:
|
||||||
|
case GDK_KEY_r: {
|
||||||
|
char *copy = g_strdup(g.directory);
|
||||||
|
load_directory(copy);
|
||||||
|
g_free(copy);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
case GDK_KEY_F9:
|
case GDK_KEY_F9:
|
||||||
if (gtk_widget_is_visible(g.browser_sidebar))
|
if (gtk_widget_is_visible(g.browser_sidebar))
|
||||||
gtk_widget_hide(g.browser_sidebar);
|
gtk_widget_hide(g.browser_sidebar);
|
||||||
|
Loading…
Reference in New Issue
Block a user