From 39cd52905b563379d0bba6f303dc541384e660f7 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sun, 19 Dec 2021 10:13:26 +0100 Subject: Control TOOLBAR_FILE_{PREVIOUS,NEXT} sensitivity --- fastiv.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fastiv.c') diff --git a/fastiv.c b/fastiv.c index c967364..d5ce540 100644 --- a/fastiv.c +++ b/fastiv.c @@ -243,6 +243,11 @@ load_directory(const gchar *dirname) } else { show_error_dialog(error); } + + gtk_widget_set_sensitive( + g.toolbar[TOOLBAR_FILE_PREVIOUS], g.files->len > 1); + gtk_widget_set_sensitive( + g.toolbar[TOOLBAR_FILE_NEXT], g.files->len > 1); g_ptr_array_add(g.files, NULL); // XXX: When something outside the filtered entries is open, the index is -- cgit v1.2.3-54-g00ecf