Add option to download missing stylesheets on startup

This commit is contained in:
GenevensiS
2026-05-18 23:25:22 +02:00
parent 2f77e8c4c1
commit c531b8aa74
54 changed files with 638 additions and 177 deletions
+4 -3
View File
@@ -226,8 +226,9 @@ unique_ptr<wxInputStream> Package::openIn(const String& file) {
}
FileInfos::iterator it = files.find(normalize_internal_filename(file));
if (it == files.end()) {
// does it look like a relative filename?
if (size_t pos = filename.find(_(".mse-")) != String::npos) {
// does it look like a relative filename?
size_t pos = filename.find(_(".mse-"));
if (pos != String::npos) {
// check for nested folder
pos = filename.find_last_of(_("/\\"));
String nestedFilename = filename + filename.SubString(pos, filename.size()) + wxFileName::GetPathSeparator() + file;
@@ -235,7 +236,7 @@ unique_ptr<wxInputStream> Package::openIn(const String& file) {
throw PackageError(_ERROR_1_("nested folder", filename));
}
else {
throw PackageError(_ERROR_2_("file not found package like", file, filename));
throw PackageNotFoundError(_ERROR_2_("file not found package like", file, filename));
}
}
}