aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-19 10:13:26 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-19 10:14:08 +0100
commit39cd52905b563379d0bba6f303dc541384e660f7 (patch)
tree70bdd72df93ed8a358eeb9f55cf997d7727dc96d
parent9feb53a792b49ec3547d4678d18e7af23c2f064f (diff)
downloadfiv-39cd52905b563379d0bba6f303dc541384e660f7.tar.gz
fiv-39cd52905b563379d0bba6f303dc541384e660f7.tar.xz
fiv-39cd52905b563379d0bba6f303dc541384e660f7.zip
Control TOOLBAR_FILE_{PREVIOUS,NEXT} sensitivity
-rw-r--r--fastiv.c5
1 files changed, 5 insertions, 0 deletions
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