You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ((vcThemeJSON.size() < 2) || (vcThemeJSON[0] != L'[')) {
246
-
// issue#13: don't try to parse if there is no data to parse
247
-
::MessageBox(_hwndNPP, L"Problems downloading Themes Collection information.\nYou might want to check your internet connection.", L"Download Problems", MB_ICONWARNING);
246
+
if (vcThemeJSON.empty()) {
247
+
// issue#13: do not continue if there's internet/connection problems
248
+
returnfalse; // nothing downloaded, so want to know to close the download-dialog to avoid annoying user with useless empty listbox
249
+
}
250
+
elseif (vcThemeJSON[0] != L'[') {
251
+
// related to issue#13: if downloadFileInMemory returns "404 Not Found" or similar, don't try to parse as JSON.
252
+
// easiest check: if the JSON isn't the expected [...] JSON array, don't continue with the _theme_;
253
+
// however, can still move to the UDL section, because that might still work, and since UDL is the primary purpose, it's probably worth it if UDL is working even if Themes aren't.
// Dark Mode Subclass and Theme: needs to go _after_ all the controls have been initialized
104
111
LRESULT nppVersion = ::SendMessage(nppData._nppHandle, NPPM_GETNPPVERSION, 1, 0); // HIWORD(nppVersion) = major version; LOWORD(nppVersion) = zero-padded minor (so 8|500 will come after 8|410)
0 commit comments