Open documents in one of three ways instead of two bools, and let dialogs know when they take many files

DocumentOpen (open, new, or restored from an autosave) replaces isNew and isRecent and Manager::new_.
The *_OPEN dialogs pick several files without being told.
This commit is contained in:
shweet committed 2026-11-22 18:56:16 -05:00
1 parent 1fc6b064ae
commit 228a15b5b3
13 files changed
+36 -31

No files matched your search

+2 -2
View File
@@ -213,7 +213,7 @@ static int draw_run(const Arguments& arguments)
}
std::string error;
Document document(arguments.file, false, &error);
Document document(arguments.file, DOCUMENT_OPEN, &error);
if (!document.is_valid())
{
std::println(stderr, "could not load {}: {}", path_to_utf8(arguments.file), error);
@@ -309,7 +309,7 @@ static int convert_run(const Arguments& arguments)
if (format == "xml")
gl.emplace();
std::string error;
Document document(arguments.file, false, &error);
Document document(arguments.file, DOCUMENT_OPEN, &error);
auto fileUtf8 = path_to_utf8(arguments.file);
if (!document.is_valid())
{