Control TOOLBAR_FILE_{PREVIOUS,NEXT} sensitivity

This commit is contained in:
Přemysl Eric Janouch 2021-12-19 10:13:26 +01:00
parent 9feb53a792
commit 39cd52905b
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -243,6 +243,11 @@ load_directory(const gchar *dirname)
} else { } else {
show_error_dialog(error); 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); g_ptr_array_add(g.files, NULL);
// XXX: When something outside the filtered entries is open, the index is // XXX: When something outside the filtered entries is open, the index is