Browse Source

Fix confusing memory allocation error message (reused FileTooBigToOpen)

Fix #14418, close #14429
pull/14442/head
xomx 12 months ago committed by Don Ho
parent
commit
ffc0ed2516
  1. 3
      PowerEditor/installer/nativeLang/czech.xml
  2. 1
      PowerEditor/installer/nativeLang/english.xml
  3. 1
      PowerEditor/installer/nativeLang/english_customizable.xml
  4. 6
      PowerEditor/src/ScintillaComponent/Buffer.cpp

3
PowerEditor/installer/nativeLang/czech.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
- last change: Notepad++ 8.6 23/Nov/2023 by Ondřej Müller (mullero@email.cz)
- last change: Notepad++ 8.6 30/Nov/2023 by Ondřej Müller (mullero@email.cz)
- N++ Community QA: https://notepad-plus-plus.org/community/topic/87/czech-translations
- contributors: Ondřej Müller (mullero@email.cz), Tomáš Hrouda (gobbet@centrum.cz), Martin Darebný (darBis)
- the most recent version of this file can be downloaded from the project master-branch here: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/czech.xml
@ -1509,6 +1509,7 @@ Přejete si použít takovéto zástupné dokumenty/karty?
POZNÁMKA: Jestliže se rozhodnete neotevírat zástupné dokumenty/karty anebo je poté sami zavřete, Vaše relace BUDE PŘI UKONČENÍ Notepadu++ automaticky MODIFIKOVÁNA!
Doporučujeme Vám, abyste si nyní zazálohovali Váš soubor &quot;session.xml&quot;."/>
<RTLvsDirectWrite title="Nelze použít směr textu RTL" message="RTL není v současnosti kompatibilní se zvoleným DirectWrite režimem. Prosím vypněte nejprve DirectWrite v sekci &quot;Různé&quot; v &quot;Nastavení&quot;, poté restartujte Notepad++ a použijte znovu tento příkaz."/>
<FileMemoryAllocationFailed title="Problém s alokací paměti pro soubor" message="Pravděpodobně není dostatek souvislé volné paměti pro soubor, který Notepad++ právě načítá."/><!-- HowToReproduce: Try to open multiple files with total size > ~700MB in the x86 Notepad++ (it will depend on the PC memory configuration and the current system memory usage...). -->
</MessageBox>
<ClipboardHistory>

1
PowerEditor/installer/nativeLang/english.xml

@ -1506,6 +1506,7 @@ Would you like to create those placeholders?
NOTE: Choosing not to create the placeholders or closing them later, your session WILL BE MODIFIED ON EXIT! We suggest you backup your &quot;session.xml&quot; now."/>
<RTLvsDirectWrite title="Cannot run RTL" message="RTL is not compatible with DirectWrite mode. Please disable DirectWrite mode in MISC. section of Preferences dialog, restart Notepad++, and try this command again."/>
<FileMemoryAllocationFailed title="Exception: File memory allocation failed" message="There is probably not enough contiguous free memory for the file being loaded by Notepad++."/><!-- HowToReproduce: Try to open multiple files with total size > ~700MB in the x86 Notepad++ (it will depend on the PC memory configuration and the current system memory usage...). -->
</MessageBox>
<ClipboardHistory>
<PanelTitle name="Clipboard History"/>

1
PowerEditor/installer/nativeLang/english_customizable.xml

@ -1506,6 +1506,7 @@ Would you like to create those placeholders?
NOTE: Choosing not to create the placeholders or closing them later, your session WILL BE MODIFIED ON EXIT! We suggest you backup your &quot;session.xml&quot; now."/>
<RTLvsDirectWrite title="Cannot run RTL" message="RTL is not compatible with DirectWrite mode. Please disable DirectWrite mode in MISC. section of Preferences dialog, restart Notepad++, and try this command again."/>
<FileMemoryAllocationFailed title="Exception: File memory allocation failed" message="There is probably not enough contiguous free memory for the file being loaded by Notepad++."/><!-- HowToReproduce: Try to open multiple files with total size > ~700MB in the x86 Notepad++ (it will depend on the PC memory configuration and the current system memory usage...). -->
</MessageBox>
<ClipboardHistory>
<PanelTitle name="Clipboard History"/>

6
PowerEditor/src/ScintillaComponent/Buffer.cpp

@ -1718,10 +1718,10 @@ bool FileManager::loadFileData(Document doc, int64_t fileSize, const TCHAR * fil
break;
case SC_STATUS_BADALLOC:
{
pNativeSpeaker->messageBox("FileTooBigToOpen",
pNativeSpeaker->messageBox("FileMemoryAllocationFailed",
_pNotepadPlus->_pEditView->getHSelf(),
TEXT("File is too big to be opened by Notepad++"),
TEXT("Exception: File size problem"),
TEXT("There is probably not enough contiguous free memory for the file being loaded by Notepad++."),
TEXT("Exception: File memory allocation failed"),
MB_OK | MB_APPLMODAL);
}
[[fallthrough]];

Loading…
Cancel
Save