mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-21 12:54:42 +02:00
Make more dialog strings translatable
This commit is contained in:
parent
1f7f00b607
commit
1a86603a0c
@ -905,7 +905,7 @@
|
|||||||
<Item id="2" name="Cancel"/>
|
<Item id="2" name="Cancel"/>
|
||||||
</ColumnEditor>
|
</ColumnEditor>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<MessageBox>
|
<MessageBox> <!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||||
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
|
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
|
||||||
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
|
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
|
||||||
<NppHelpAbsentWarning title="File does not exist" message="
|
<NppHelpAbsentWarning title="File does not exist" message="
|
||||||
@ -924,7 +924,6 @@ Continue?"/>
|
|||||||
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
|
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
|
||||||
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
|
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
|
||||||
|
|
||||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
|
||||||
<NbFileToOpenImportantWarning title="Amount of files to open is too large" message="$INT_REPLACE$ files are about to be opened.
|
<NbFileToOpenImportantWarning title="Amount of files to open is too large" message="$INT_REPLACE$ files are about to be opened.
|
||||||
Are you sure to open them?"/>
|
Are you sure to open them?"/>
|
||||||
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
||||||
@ -932,14 +931,44 @@ or on a folder needed privilege right for writing access.
|
|||||||
Your settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
Your settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
||||||
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
||||||
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
||||||
|
|
||||||
<DroppingFolderAsProjetModeWarning title="Invalid action" message="You can drop only files or folders but not both, because you're in dropping Folder as Projet mode.
|
<DroppingFolderAsProjetModeWarning title="Invalid action" message="You can drop only files or folders but not both, because you're in dropping Folder as Projet mode.
|
||||||
you have to enable "Open all files of folder instead of launching Folder as Workspace on folder dropping" in "Default Directory" section of Preferences dialog to make this operation work."/>
|
you have to enable "Open all files of folder instead of launching Folder as Workspace on folder dropping" in "Default Directory" section of Preferences dialog to make this operation work."/>
|
||||||
|
|
||||||
<SortingError title="Sorting Error" message="Unable to perform numeric sort due to line $STR_REPLACE$."/>
|
<SortingError title="Sorting Error" message="Unable to perform numeric sort due to line $STR_REPLACE$."/>
|
||||||
<ColumnModeTip title="Column Mode Tip" message="Please use "ALT+Mouse Selection" or "Alt+Shift+Arrow key" to switch to column mode."/>
|
<ColumnModeTip title="Column Mode Tip" message="Please use "ALT+Mouse Selection" or "Alt+Shift+Arrow key" to switch to column mode."/>
|
||||||
<BufferInvalidWarning title="Save failed" message="Cannot save: Buffer is invalid."/>
|
<BufferInvalidWarning title="Save failed" message="Cannot save: Buffer is invalid."/>
|
||||||
|
<DoSaveOrNot title="Save" message="Save file "$STR_REPLACE$" ?"/>
|
||||||
|
<DoCloseOrNot title="Keep non existing file" message="The file "$STR_REPLACE$" doesn't exist anymore.
|
||||||
|
Keep this file in editor?"/>
|
||||||
|
<DoDeleteOrNot title="Delete file" message="The file "$STR_REPLACE$"
|
||||||
|
will be moved to your Recycle Bin and this document will be closed.
|
||||||
|
Continue?"/>
|
||||||
|
<NoBackupDoSaveFile title="Save" message="Your backup file cannot be found (deleted from outside).
|
||||||
|
Save it otherwise your data will be lost
|
||||||
|
Do you want to save file "$STR_REPLACE$" ?"/>
|
||||||
|
<DoReloadOrNot title="Reload" message=""$STR_REPLACE$"
|
||||||
|
|
||||||
|
This file has been modified by another program.
|
||||||
|
Do you want to reload it?"/>
|
||||||
|
<DoReloadOrNotAndLooseChange title="Reload" message=""$STR_REPLACE$"
|
||||||
|
|
||||||
|
This file has been modified by another program.
|
||||||
|
Do you want to reload it and lose the changes made in Notepad++?"/>
|
||||||
|
<PrehistoricSystemDetected title="Prehistoric system detected" message="It seems you still use a prehistoric system, This feature works only on a modern system, sorry."/>
|
||||||
|
<XpUpdaterProblem title="Notepad++ Updater" message="Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.
|
||||||
|
Do you want to go to Notepad++ page to download the latest version?"/>
|
||||||
|
<DocTooDirtyToMonitor title="Monitoring problem" message="The document is dirty. Please save the modification before monitoring it."/>
|
||||||
|
<DocNoExistToMonitor title="Monitoring problem" message="The file should exist to be monitored."/>
|
||||||
|
<FileTooBigToOpene title="File size problem" message="File is too big to be opened by Notepad++"/>
|
||||||
|
<CreateNewFileOrNot title="Create new file" message=""$INT_REPLACE$" doesn't exist. Create it?."/>
|
||||||
|
<CreateNewFileError title="Create new file" message="Cannot create the file "$INT_REPLACE$"."/>
|
||||||
|
<OpenFileError title="ERROR" message="Can not open file "$INT_REPLACE$"."/>
|
||||||
|
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at "$INT_REPLACE$".
|
||||||
|
|
||||||
|
Do you want to save the current file anyways?"/>
|
||||||
|
<LoadStylersFailed title="Load stylers.xml failed" message="Load "$INT_REPLACE$" failed!"/>
|
||||||
|
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
|
||||||
|
Do you want to recover your langs.xml?"/>
|
||||||
|
<LoadLangsFailedFinal title="Configurator" message="Load langs.xml failed!"/>
|
||||||
</MessageBox>
|
</MessageBox>
|
||||||
<ClipboardHistory>
|
<ClipboardHistory>
|
||||||
<PanelTitle name="Clipboard History"/>
|
<PanelTitle name="Clipboard History"/>
|
||||||
@ -1020,7 +1049,7 @@ you have to enable "Open all files of folder instead of launching Folder as
|
|||||||
<cloud-invalid-warning value="Invalid path."/>
|
<cloud-invalid-warning value="Invalid path."/>
|
||||||
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
||||||
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
||||||
<1-to-2-buttons-tip value="2 find buttons mode"/>
|
<two-find-buttons-tip value="2 find buttons mode"/>
|
||||||
</MiscStrings>
|
</MiscStrings>
|
||||||
</Native-Langue>
|
</Native-Langue>
|
||||||
</NotepadPlus>
|
</NotepadPlus>
|
||||||
|
@ -905,7 +905,7 @@
|
|||||||
<Item id="2" name="Cancel"/>
|
<Item id="2" name="Cancel"/>
|
||||||
</ColumnEditor>
|
</ColumnEditor>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<MessageBox>
|
<MessageBox> <!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||||
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
|
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
|
||||||
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
|
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
|
||||||
<NppHelpAbsentWarning title="File does not exist" message="
|
<NppHelpAbsentWarning title="File does not exist" message="
|
||||||
@ -924,7 +924,6 @@ Continue?"/>
|
|||||||
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
|
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
|
||||||
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
|
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
|
||||||
|
|
||||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
|
||||||
<NbFileToOpenImportantWarning title="Amount of files to open is too large" message="$INT_REPLACE$ files are about to be opened.
|
<NbFileToOpenImportantWarning title="Amount of files to open is too large" message="$INT_REPLACE$ files are about to be opened.
|
||||||
Are you sure to open them?"/>
|
Are you sure to open them?"/>
|
||||||
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
||||||
@ -932,6 +931,44 @@ or on a folder needed privilege right for writing access.
|
|||||||
Your settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
Your settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
||||||
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
||||||
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
||||||
|
<DroppingFolderAsProjetModeWarning title="Invalid action" message="You can drop only files or folders but not both, because you're in dropping Folder as Projet mode.
|
||||||
|
you have to enable "Open all files of folder instead of launching Folder as Workspace on folder dropping" in "Default Directory" section of Preferences dialog to make this operation work."/>
|
||||||
|
<SortingError title="Sorting Error" message="Unable to perform numeric sort due to line $STR_REPLACE$."/>
|
||||||
|
<ColumnModeTip title="Column Mode Tip" message="Please use "ALT+Mouse Selection" or "Alt+Shift+Arrow key" to switch to column mode."/>
|
||||||
|
<BufferInvalidWarning title="Save failed" message="Cannot save: Buffer is invalid."/>
|
||||||
|
<DoSaveOrNot title="Save" message="Save file "$STR_REPLACE$" ?"/>
|
||||||
|
<DoCloseOrNot title="Keep non existing file" message="The file "$STR_REPLACE$" doesn't exist anymore.
|
||||||
|
Keep this file in editor?"/>
|
||||||
|
<DoDeleteOrNot title="Delete file" message="The file "$STR_REPLACE$"
|
||||||
|
will be moved to your Recycle Bin and this document will be closed.
|
||||||
|
Continue?"/>
|
||||||
|
<NoBackupDoSaveFile title="Save" message="Your backup file cannot be found (deleted from outside).
|
||||||
|
Save it otherwise your data will be lost
|
||||||
|
Do you want to save file "$STR_REPLACE$" ?"/>
|
||||||
|
<DoReloadOrNot title="Reload" message=""$STR_REPLACE$"
|
||||||
|
|
||||||
|
This file has been modified by another program.
|
||||||
|
Do you want to reload it?"/>
|
||||||
|
<DoReloadOrNotAndLooseChange title="Reload" message=""$STR_REPLACE$"
|
||||||
|
|
||||||
|
This file has been modified by another program.
|
||||||
|
Do you want to reload it and lose the changes made in Notepad++?"/>
|
||||||
|
<PrehistoricSystemDetected title="Prehistoric system detected" message="It seems you still use a prehistoric system, This feature works only on a modern system, sorry."/>
|
||||||
|
<XpUpdaterProblem title="Notepad++ Updater" message="Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.
|
||||||
|
Do you want to go to Notepad++ page to download the latest version?"/>
|
||||||
|
<DocTooDirtyToMonitor title="Monitoring problem" message="The document is dirty. Please save the modification before monitoring it."/>
|
||||||
|
<DocNoExistToMonitor title="Monitoring problem" message="The file should exist to be monitored."/>
|
||||||
|
<FileTooBigToOpene title="File size problem" message="File is too big to be opened by Notepad++"/>
|
||||||
|
<CreateNewFileOrNot title="Create new file" message=""$INT_REPLACE$" doesn't exist. Create it?."/>
|
||||||
|
<CreateNewFileError title="Create new file" message="Cannot create the file "$INT_REPLACE$"."/>
|
||||||
|
<OpenFileError title="ERROR" message="Can not open file "$INT_REPLACE$"."/>
|
||||||
|
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at "$INT_REPLACE$".
|
||||||
|
|
||||||
|
Do you want to save the current file anyways?"/>
|
||||||
|
<LoadStylersFailed title="Load stylers.xml failed" message="Load "$INT_REPLACE$" failed!"/>
|
||||||
|
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
|
||||||
|
Do you want to recover your langs.xml?"/>
|
||||||
|
<LoadLangsFailedFinal title="Configurator" message="Load langs.xml failed!"/>
|
||||||
</MessageBox>
|
</MessageBox>
|
||||||
<ClipboardHistory>
|
<ClipboardHistory>
|
||||||
<PanelTitle name="Clipboard History"/>
|
<PanelTitle name="Clipboard History"/>
|
||||||
@ -1012,7 +1049,7 @@ Your settings on cloud will be canceled. Please reset a coherent value via Prefe
|
|||||||
<cloud-invalid-warning value="Invalid path."/>
|
<cloud-invalid-warning value="Invalid path."/>
|
||||||
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
||||||
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
||||||
<1-to-2-buttons-tip value="2 find buttons mode"/>
|
<two-find-buttons-tip value="2 find buttons mode"/>
|
||||||
</MiscStrings>
|
</MiscStrings>
|
||||||
</Native-Langue>
|
</Native-Langue>
|
||||||
</NotepadPlus>
|
</NotepadPlus>
|
||||||
|
@ -1824,41 +1824,55 @@ void Notepad_plus::filePrint(bool showDialog)
|
|||||||
|
|
||||||
int Notepad_plus::doSaveOrNot(const TCHAR *fn)
|
int Notepad_plus::doSaveOrNot(const TCHAR *fn)
|
||||||
{
|
{
|
||||||
TCHAR pattern[64] = TEXT("Save file \"%s\" ?");
|
return _nativeLangSpeaker.messageBox("DoSaveOrNot",
|
||||||
TCHAR phrase[512];
|
_pPublicInterface->getHSelf(),
|
||||||
wsprintf(phrase, pattern, fn);
|
TEXT("Save file \"$STR_REPLACE$\" ?"),
|
||||||
return doActionOrNot(TEXT("Save"), phrase, MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL);
|
TEXT("Save"),
|
||||||
|
MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL,
|
||||||
|
0, // not used
|
||||||
|
fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Notepad_plus::doReloadOrNot(const TCHAR *fn, bool dirty)
|
int Notepad_plus::doReloadOrNot(const TCHAR *fn, bool dirty)
|
||||||
{
|
{
|
||||||
TCHAR* pattern = TEXT("%s\r\rThis file has been modified by another program.\rDo you want to reload it%s?");
|
if (dirty)
|
||||||
TCHAR* lose_info_str = dirty ? TEXT(" and lose the changes made in Notepad++") : TEXT("");
|
return _nativeLangSpeaker.messageBox("DoReloadOrNotAndLooseChange",
|
||||||
TCHAR phrase[512];
|
_pPublicInterface->getHSelf(),
|
||||||
wsprintf(phrase, pattern, fn, lose_info_str);
|
TEXT("\"$STR_REPLACE$\"\r\rThis file has been modified by another program.\rDo you want to reload it and lose the changes made in Notepad++?"),
|
||||||
int icon = dirty ? MB_ICONEXCLAMATION : MB_ICONQUESTION;
|
TEXT("Reload"),
|
||||||
return doActionOrNot(TEXT("Reload"), phrase, MB_YESNO | MB_APPLMODAL | icon);
|
MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION,
|
||||||
|
0, // not used
|
||||||
|
fn);
|
||||||
|
else
|
||||||
|
return _nativeLangSpeaker.messageBox("DoReloadOrNot",
|
||||||
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("\"$STR_REPLACE$\"\r\rThis file has been modified by another program.\rDo you want to reload it?"),
|
||||||
|
TEXT("Reload"),
|
||||||
|
MB_YESNO | MB_APPLMODAL | MB_ICONQUESTION,
|
||||||
|
0, // not used
|
||||||
|
fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Notepad_plus::doCloseOrNot(const TCHAR *fn)
|
int Notepad_plus::doCloseOrNot(const TCHAR *fn)
|
||||||
{
|
{
|
||||||
TCHAR pattern[128] = TEXT("The file \"%s\" doesn't exist anymore.\rKeep this file in editor?");
|
return _nativeLangSpeaker.messageBox("DoCloseOrNot",
|
||||||
TCHAR phrase[512];
|
_pPublicInterface->getHSelf(),
|
||||||
wsprintf(phrase, pattern, fn);
|
TEXT("The file \"$STR_REPLACE$\" doesn't exist anymore.\rKeep this file in editor?"),
|
||||||
return doActionOrNot(TEXT("Keep non existing file"), phrase, MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL);
|
TEXT("Keep non existing file"),
|
||||||
|
MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL,
|
||||||
|
0, // not used
|
||||||
|
fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Notepad_plus::doDeleteOrNot(const TCHAR *fn)
|
int Notepad_plus::doDeleteOrNot(const TCHAR *fn)
|
||||||
{
|
{
|
||||||
TCHAR pattern[128] = TEXT("The file \"%s\"\rwill be moved to your Recycle Bin and this document will be closed.\rContinue?");
|
return _nativeLangSpeaker.messageBox("DoDeleteOrNot",
|
||||||
TCHAR phrase[512];
|
_pPublicInterface->getHSelf(),
|
||||||
wsprintf(phrase, pattern, fn);
|
TEXT("The file \"$STR_REPLACE$\"\rwill be moved to your Recycle Bin and this document will be closed.\rContinue?"),
|
||||||
return doActionOrNot(TEXT("Delete file"), phrase, MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL);
|
TEXT("Delete file"),
|
||||||
}
|
MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL,
|
||||||
|
0, // not used
|
||||||
int Notepad_plus::doActionOrNot(const TCHAR *title, const TCHAR *displayText, int type)
|
fn);
|
||||||
{
|
|
||||||
return ::MessageBox(_pPublicInterface->getHSelf(), displayText, title, type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::enableMenu(int cmdID, bool doEnable) const
|
void Notepad_plus::enableMenu(int cmdID, bool doEnable) const
|
||||||
@ -5873,7 +5887,12 @@ void Notepad_plus::launchDocMap()
|
|||||||
{
|
{
|
||||||
if (!(NppParameters::getInstance())->isTransparentAvailable())
|
if (!(NppParameters::getInstance())->isTransparentAvailable())
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("It seems you still use a prehistoric system, This feature works only on a modern system, sorry."), TEXT(""), MB_OK);
|
_nativeLangSpeaker.messageBox("PrehistoricSystemDetected",
|
||||||
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("It seems you still use a prehistoric system, This feature works only on a modern system, sorry."),
|
||||||
|
TEXT("Prehistoric system detected"),
|
||||||
|
MB_OK);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5961,10 +5980,6 @@ void Notepad_plus::launchFunctionList()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct TextPlayerParams
|
struct TextPlayerParams
|
||||||
{
|
{
|
||||||
HWND _nppHandle;
|
HWND _nppHandle;
|
||||||
@ -5988,8 +6003,6 @@ struct Quote
|
|||||||
const char *_quote;
|
const char *_quote;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const int nbQuote = 203;
|
const int nbQuote = 203;
|
||||||
Quote quotes[nbQuote] =
|
Quote quotes[nbQuote] =
|
||||||
{
|
{
|
||||||
|
@ -693,6 +693,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
{
|
{
|
||||||
if (lstrlen(fileStr) >= int(wParam))
|
if (lstrlen(fileStr) >= int(wParam))
|
||||||
{
|
{
|
||||||
|
// Not message for users so no translation
|
||||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM error"), MB_OK);
|
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM error"), MB_OK);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -714,6 +715,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
{
|
{
|
||||||
if (lstrlen(str) >= int(wParam)) //buffer too small
|
if (lstrlen(str) >= int(wParam)) //buffer too small
|
||||||
{
|
{
|
||||||
|
// Not message for users so no translation
|
||||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETCURRENTWORD error"), MB_OK);
|
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETCURRENTWORD error"), MB_OK);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -770,6 +772,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
|
|
||||||
if (lstrlen(str) >= int(wParam)) //buffer too small
|
if (lstrlen(str) >= int(wParam)) //buffer too small
|
||||||
{
|
{
|
||||||
|
// Not message for users so no translation
|
||||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETFILENAMEATCURSOR error"), MB_OK);
|
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETFILENAMEATCURSOR error"), MB_OK);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -797,6 +800,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
{
|
{
|
||||||
if (lstrlen(str) >= int(wParam))
|
if (lstrlen(str) >= int(wParam))
|
||||||
{
|
{
|
||||||
|
// Not message for users so no translation
|
||||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETNPPDIRECTORY error"), MB_OK);
|
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETNPPDIRECTORY error"), MB_OK);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1984,7 +1984,11 @@ void Notepad_plus::command(int id)
|
|||||||
{
|
{
|
||||||
if (curBuf->isDirty())
|
if (curBuf->isDirty())
|
||||||
{
|
{
|
||||||
::MessageBox(_pPublicInterface->getHSelf(), TEXT("The document is dirty. Please save the modification before monitoring it."), TEXT("Monitoring problem"), MB_OK);
|
_nativeLangSpeaker.messageBox("DocTooDirtyToMonitor",
|
||||||
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("The document is dirty. Please save the modification before monitoring it."),
|
||||||
|
TEXT("Monitoring problem"),
|
||||||
|
MB_OK);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2000,7 +2004,11 @@ void Notepad_plus::command(int id)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
::MessageBox(_pPublicInterface->getHSelf(), TEXT("The file should exist to be monitored."), TEXT("Monitoring problem"), MB_OK);
|
_nativeLangSpeaker.messageBox("DocNoExistToMonitor",
|
||||||
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("The file should exist to be monitored."),
|
||||||
|
TEXT("Monitoring problem"),
|
||||||
|
MB_OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2076,7 +2084,7 @@ void Notepad_plus::command(int id)
|
|||||||
if (buf->isDirty())
|
if (buf->isDirty())
|
||||||
{
|
{
|
||||||
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
|
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
|
||||||
NULL,
|
_pPublicInterface->getHSelf(),
|
||||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||||
TEXT("Save Current Modification"),
|
TEXT("Save Current Modification"),
|
||||||
MB_YESNO);
|
MB_YESNO);
|
||||||
@ -2094,7 +2102,7 @@ void Notepad_plus::command(int id)
|
|||||||
{
|
{
|
||||||
generic_string msg, title;
|
generic_string msg, title;
|
||||||
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
|
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
|
||||||
NULL,
|
_pPublicInterface->getHSelf(),
|
||||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||||
TEXT("Lose Undo Ability Waning"),
|
TEXT("Lose Undo Ability Waning"),
|
||||||
MB_YESNO);
|
MB_YESNO);
|
||||||
@ -2191,7 +2199,7 @@ void Notepad_plus::command(int id)
|
|||||||
{
|
{
|
||||||
generic_string warning, title;
|
generic_string warning, title;
|
||||||
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
|
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
|
||||||
NULL,
|
_pPublicInterface->getHSelf(),
|
||||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||||
TEXT("Save Current Modification"),
|
TEXT("Save Current Modification"),
|
||||||
MB_YESNO);
|
MB_YESNO);
|
||||||
@ -2209,7 +2217,7 @@ void Notepad_plus::command(int id)
|
|||||||
{
|
{
|
||||||
generic_string msg, title;
|
generic_string msg, title;
|
||||||
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
|
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
|
||||||
NULL,
|
_pPublicInterface->getHSelf(),
|
||||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||||
TEXT("Lose Undo Ability Waning"),
|
TEXT("Lose Undo Ability Waning"),
|
||||||
MB_YESNO);
|
MB_YESNO);
|
||||||
@ -2665,6 +2673,7 @@ void Notepad_plus::command(int id)
|
|||||||
|
|
||||||
case IDM_CMDLINEARGUMENTS:
|
case IDM_CMDLINEARGUMENTS:
|
||||||
{
|
{
|
||||||
|
// No translattable
|
||||||
::MessageBox(NULL, COMMAND_ARG_HELP, TEXT("Notepad++ Command Argument Help"), MB_OK);
|
::MessageBox(NULL, COMMAND_ARG_HELP, TEXT("Notepad++ Command Argument Help"), MB_OK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2694,7 +2703,12 @@ void Notepad_plus::command(int id)
|
|||||||
winVer ver = NppParameters::getInstance()->getWinVersion();
|
winVer ver = NppParameters::getInstance()->getWinVersion();
|
||||||
if (ver <= WV_XP)
|
if (ver <= WV_XP)
|
||||||
{
|
{
|
||||||
long res = ::MessageBox(NULL, TEXT("Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.\rDo you want to go to Notepad++ page to download the latest version?"), TEXT("Notepad++ Updater"), MB_YESNO);
|
long res = _nativeLangSpeaker.messageBox("XpUpdaterProblem",
|
||||||
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.\rDo you want to go to Notepad++ page to download the latest version?"),
|
||||||
|
TEXT("Notepad++ Updater"),
|
||||||
|
MB_YESNO);
|
||||||
|
|
||||||
if (res == IDYES)
|
if (res == IDYES)
|
||||||
{
|
{
|
||||||
::ShellExecute(NULL, TEXT("open"), TEXT("https://notepad-plus-plus.org/download/"), NULL, NULL, SW_SHOWNORMAL);
|
::ShellExecute(NULL, TEXT("open"), TEXT("https://notepad-plus-plus.org/download/"), NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
@ -50,14 +50,10 @@ DWORD WINAPI Notepad_plus::monitorFileOnChange(void * params)
|
|||||||
|
|
||||||
//The folder to watch :
|
//The folder to watch :
|
||||||
WCHAR folderToMonitor[MAX_PATH];
|
WCHAR folderToMonitor[MAX_PATH];
|
||||||
//::MessageBoxW(NULL, mfp->_fullFilePath, TEXT("PATH AFTER thread"), MB_OK);
|
|
||||||
lstrcpy(folderToMonitor, fullFileName);
|
lstrcpy(folderToMonitor, fullFileName);
|
||||||
//MessageBox(NULL, fullFileName, TEXT("fullFileName"), MB_OK);
|
|
||||||
|
|
||||||
::PathRemoveFileSpecW(folderToMonitor);
|
::PathRemoveFileSpecW(folderToMonitor);
|
||||||
|
|
||||||
//MessageBox(NULL, folderToMonitor, TEXT("folderToMonitor"), MB_OK);
|
|
||||||
|
|
||||||
const DWORD dwNotificationFlags = FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_FILE_NAME;
|
const DWORD dwNotificationFlags = FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_FILE_NAME;
|
||||||
|
|
||||||
// Create the monitor and add directory to watch.
|
// Create the monitor and add directory to watch.
|
||||||
@ -121,7 +117,6 @@ DWORD WINAPI Notepad_plus::monitorFileOnChange(void * params)
|
|||||||
// Just for sample purposes. The destructor will
|
// Just for sample purposes. The destructor will
|
||||||
// call Terminate() automatically.
|
// call Terminate() automatically.
|
||||||
changes.Terminate();
|
changes.Terminate();
|
||||||
//MessageBox(NULL, TEXT("FREEDOM !!!"), TEXT("out"), MB_OK);
|
|
||||||
delete monitorInfo;
|
delete monitorInfo;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -181,8 +176,6 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
BufferID test = MainFileManager->getBufferFromName(fileName2Find.c_str());
|
BufferID test = MainFileManager->getBufferFromName(fileName2Find.c_str());
|
||||||
if (test != BUFFER_INVALID && !isSnapshotMode)
|
if (test != BUFFER_INVALID && !isSnapshotMode)
|
||||||
{
|
{
|
||||||
//switchToFile(test);
|
|
||||||
//Dont switch, not responsibility of doOpen, but of caller
|
|
||||||
if (_pTrayIco)
|
if (_pTrayIco)
|
||||||
{
|
{
|
||||||
if (_pTrayIco->isInTray())
|
if (_pTrayIco->isInTray())
|
||||||
@ -229,8 +222,15 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
bool isCreateFileSuccessful = false;
|
bool isCreateFileSuccessful = false;
|
||||||
if (PathFileExists(longFileDir.c_str()))
|
if (PathFileExists(longFileDir.c_str()))
|
||||||
{
|
{
|
||||||
wsprintf(str2display, TEXT("%s doesn't exist. Create it?"), longFileName);
|
int res = _nativeLangSpeaker.messageBox("CreateNewFileOrNot",
|
||||||
if (::MessageBox(_pPublicInterface->getHSelf(), str2display, TEXT("Create new file"), MB_YESNO) == IDYES)
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("\"$INT_REPLACE$\" doesn't exist. Create it?."),
|
||||||
|
TEXT("Create new file"),
|
||||||
|
MB_YESNO,
|
||||||
|
0,
|
||||||
|
longFileName);
|
||||||
|
|
||||||
|
if (res == IDYES)
|
||||||
{
|
{
|
||||||
bool res = MainFileManager->createEmptyFile(longFileName);
|
bool res = MainFileManager->createEmptyFile(longFileName);
|
||||||
if (res)
|
if (res)
|
||||||
@ -239,8 +239,13 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wsprintf(str2display, TEXT("Cannot create the file \"%s\""), longFileName);
|
_nativeLangSpeaker.messageBox("CreateNewFileError",
|
||||||
::MessageBox(_pPublicInterface->getHSelf(), str2display, TEXT("Create new file"), MB_OK);
|
_pPublicInterface->getHSelf(),
|
||||||
|
TEXT("Cannot create the file \"$INT_REPLACE$\"."),
|
||||||
|
TEXT("Create new file"),
|
||||||
|
MB_OK,
|
||||||
|
0,
|
||||||
|
longFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -389,10 +394,14 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
generic_string msg = TEXT("Can not open file \"");
|
_nativeLangSpeaker.messageBox("OpenFileError",
|
||||||
msg += longFileName;
|
_pPublicInterface->getHSelf(),
|
||||||
msg += TEXT("\".");
|
TEXT("Can not open file \"$INT_REPLACE$\"."),
|
||||||
::MessageBox(_pPublicInterface->getHSelf(), msg.c_str(), TEXT("ERROR"), MB_OK);
|
TEXT("ERROR"),
|
||||||
|
MB_OK,
|
||||||
|
0,
|
||||||
|
longFileName);
|
||||||
|
|
||||||
_isFileOpening = false;
|
_isFileOpening = false;
|
||||||
|
|
||||||
scnN.nmhdr.code = NPPN_FILELOADFAILED;
|
scnN.nmhdr.code = NPPN_FILELOADFAILED;
|
||||||
@ -900,10 +909,14 @@ bool Notepad_plus::fileCloseAll(bool doDeleteBackup, bool isSnapshotMode)
|
|||||||
if(!activateBuffer(id, SUB_VIEW))
|
if(!activateBuffer(id, SUB_VIEW))
|
||||||
switchEditViewTo(MAIN_VIEW);
|
switchEditViewTo(MAIN_VIEW);
|
||||||
|
|
||||||
TCHAR pattern[140] = TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"%s\" ?");
|
int res = _nativeLangSpeaker.messageBox("NoBackupDoSaveFile",
|
||||||
TCHAR phrase[512];
|
_pPublicInterface->getHSelf(),
|
||||||
wsprintf(phrase, pattern, buf->getFullPathName());
|
TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"$STR_REPLACE$\" ?"),
|
||||||
int res = doActionOrNot(TEXT("Save"), phrase, MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL);
|
TEXT("Save"),
|
||||||
|
MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL,
|
||||||
|
0, // not used
|
||||||
|
buf->getFullPathName());
|
||||||
|
|
||||||
//int res = doSaveOrNot(buf->getFullPathName());
|
//int res = doSaveOrNot(buf->getFullPathName());
|
||||||
if (res == IDYES)
|
if (res == IDYES)
|
||||||
{
|
{
|
||||||
@ -953,11 +966,14 @@ bool Notepad_plus::fileCloseAll(bool doDeleteBackup, bool isSnapshotMode)
|
|||||||
activateBuffer(id, SUB_VIEW);
|
activateBuffer(id, SUB_VIEW);
|
||||||
switchEditViewTo(SUB_VIEW);
|
switchEditViewTo(SUB_VIEW);
|
||||||
|
|
||||||
TCHAR pattern[140] = TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"%s\" ?");
|
int res = _nativeLangSpeaker.messageBox("NoBackupDoSaveFile",
|
||||||
TCHAR phrase[512];
|
_pPublicInterface->getHSelf(),
|
||||||
wsprintf(phrase, pattern, buf->getFullPathName());
|
TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"$STR_REPLACE$\" ?"),
|
||||||
int res = doActionOrNot(TEXT("Save"), phrase, MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL);
|
TEXT("Save"),
|
||||||
//int res = doSaveOrNot(buf->getFullPathName());
|
MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL,
|
||||||
|
0, // not used
|
||||||
|
buf->getFullPathName());
|
||||||
|
|
||||||
if (res == IDYES)
|
if (res == IDYES)
|
||||||
{
|
{
|
||||||
if (!fileSave(id))
|
if (!fileSave(id))
|
||||||
@ -1250,11 +1266,15 @@ bool Notepad_plus::fileSave(BufferID id)
|
|||||||
|
|
||||||
if (not ::CopyFile(fn, fn_bak.c_str(), FALSE))
|
if (not ::CopyFile(fn, fn_bak.c_str(), FALSE))
|
||||||
{
|
{
|
||||||
generic_string msg = TEXT("The previous version of the file could not be saved into the backup directory at ");
|
int res = _nativeLangSpeaker.messageBox("FileBackupFailed",
|
||||||
msg += TEXT("\"");
|
_pPublicInterface->getHSelf(),
|
||||||
msg += fn_bak;
|
TEXT("The previous version of the file could not be saved into the backup directory at \"$INT_REPLACE$\".\r\rDo you want to save the current file anyways?"),
|
||||||
msg += TEXT("\".\r\rDo you want to save the current file anyways?");
|
TEXT("File Backup Failed"),
|
||||||
if (::MessageBox(_pPublicInterface->getHSelf(), msg.c_str(), TEXT("File Backup Failed"), MB_YESNO | MB_ICONERROR) == IDNO)
|
MB_YESNO | MB_ICONERROR,
|
||||||
|
0,
|
||||||
|
fn_bak.c_str());
|
||||||
|
|
||||||
|
if (res == IDNO)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -509,13 +509,6 @@ static const ScintillaKeyDefinition scintKeyDefs[] =
|
|||||||
|
|
||||||
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
|
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int strVal(const TCHAR *str, int base)
|
int strVal(const TCHAR *str, int base)
|
||||||
{
|
{
|
||||||
if (!str) return -1;
|
if (!str) return -1;
|
||||||
@ -644,11 +637,6 @@ typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
|
|||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cutString(const TCHAR* str2cut, vector<generic_string>& patternVect)
|
void cutString(const TCHAR* str2cut, vector<generic_string>& patternVect)
|
||||||
{
|
{
|
||||||
if (str2cut == nullptr) return;
|
if (str2cut == nullptr) return;
|
||||||
@ -896,11 +884,20 @@ bool NppParameters::reloadStylers(TCHAR *stylePath)
|
|||||||
if (_pXmlUserStylerDoc)
|
if (_pXmlUserStylerDoc)
|
||||||
delete _pXmlUserStylerDoc;
|
delete _pXmlUserStylerDoc;
|
||||||
|
|
||||||
_pXmlUserStylerDoc = new TiXmlDocument(stylePath?stylePath:_stylerPath);
|
const TCHAR* stylePathToLoad = stylePath != nullptr ? stylePath : _stylerPath.c_str();
|
||||||
|
_pXmlUserStylerDoc = new TiXmlDocument(stylePathToLoad);
|
||||||
|
|
||||||
bool loadOkay = _pXmlUserStylerDoc->LoadFile();
|
bool loadOkay = _pXmlUserStylerDoc->LoadFile();
|
||||||
if (!loadOkay)
|
if (!loadOkay)
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("Load stylers.xml failed!"), stylePath, MB_OK);
|
_pNativeLangSpeaker->messageBox("LoadStylersFailed",
|
||||||
|
NULL,
|
||||||
|
TEXT("Load \"$INT_REPLACE$\" failed!"),
|
||||||
|
TEXT("Load stylers.xml failed"),
|
||||||
|
MB_OK,
|
||||||
|
0,
|
||||||
|
stylePathToLoad);
|
||||||
|
|
||||||
delete _pXmlUserStylerDoc;
|
delete _pXmlUserStylerDoc;
|
||||||
_pXmlUserStylerDoc = NULL;
|
_pXmlUserStylerDoc = NULL;
|
||||||
return false;
|
return false;
|
||||||
@ -1083,7 +1080,11 @@ bool NppParameters::load()
|
|||||||
|
|
||||||
if (generic_stat(langs_xml_path.c_str(), &buf)==0)
|
if (generic_stat(langs_xml_path.c_str(), &buf)==0)
|
||||||
if (buf.st_size == 0)
|
if (buf.st_size == 0)
|
||||||
doRecover = ::MessageBox(NULL, TEXT("Load langs.xml failed!\rDo you want to recover your langs.xml?"), TEXT("Configurator"),MB_YESNO);
|
doRecover = _pNativeLangSpeaker->messageBox("LoadLangsFailed",
|
||||||
|
NULL,
|
||||||
|
TEXT("Load langs.xml failed!\rDo you want to recover your langs.xml?"),
|
||||||
|
TEXT("Configurator"),
|
||||||
|
MB_YESNO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
doRecover = true;
|
doRecover = true;
|
||||||
@ -1101,7 +1102,12 @@ bool NppParameters::load()
|
|||||||
bool loadOkay = _pXmlDoc->LoadFile();
|
bool loadOkay = _pXmlDoc->LoadFile();
|
||||||
if (!loadOkay)
|
if (!loadOkay)
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("Load langs.xml failed!"), TEXT("Configurator"),MB_OK);
|
_pNativeLangSpeaker->messageBox("LoadLangsFailedFinal",
|
||||||
|
NULL,
|
||||||
|
TEXT("Load langs.xml failed!"),
|
||||||
|
TEXT("Configurator"),
|
||||||
|
MB_OK);
|
||||||
|
|
||||||
delete _pXmlDoc;
|
delete _pXmlDoc;
|
||||||
_pXmlDoc = nullptr;
|
_pXmlDoc = nullptr;
|
||||||
isAllLaoded = false;
|
isAllLaoded = false;
|
||||||
@ -1157,7 +1163,14 @@ bool NppParameters::load()
|
|||||||
loadOkay = _pXmlUserStylerDoc->LoadFile();
|
loadOkay = _pXmlUserStylerDoc->LoadFile();
|
||||||
if (!loadOkay)
|
if (!loadOkay)
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("Load stylers.xml failed!"), _stylerPath.c_str(), MB_OK);
|
_pNativeLangSpeaker->messageBox("LoadStylersFailed",
|
||||||
|
NULL,
|
||||||
|
TEXT("Load \"$INT_REPLACE$\" failed!"),
|
||||||
|
TEXT("Load stylers.xml failed"),
|
||||||
|
MB_OK,
|
||||||
|
0,
|
||||||
|
_stylerPath.c_str());
|
||||||
|
|
||||||
delete _pXmlUserStylerDoc;
|
delete _pXmlUserStylerDoc;
|
||||||
_pXmlUserStylerDoc = NULL;
|
_pXmlUserStylerDoc = NULL;
|
||||||
isAllLaoded = false;
|
isAllLaoded = false;
|
||||||
|
@ -1337,14 +1337,13 @@ bool FileManager::loadFileData(Document doc, const TCHAR * filename, char* data,
|
|||||||
// As a 32bit application, we cannot allocate 2 buffer of more than INT_MAX size (it takes the whole address space)
|
// As a 32bit application, we cannot allocate 2 buffer of more than INT_MAX size (it takes the whole address space)
|
||||||
if (bufferSizeRequested > INT_MAX)
|
if (bufferSizeRequested > INT_MAX)
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("File is too big to be opened by Notepad++"), TEXT("File size problem"), MB_OK|MB_APPLMODAL);
|
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
|
||||||
/*
|
pNativeSpeaker->messageBox("FileTooBigToOpene",
|
||||||
_nativeLangSpeaker.messageBox("NbFileToOpenImportantWarning",
|
NULL,
|
||||||
_pPublicInterface->getHSelf(),
|
|
||||||
TEXT("File is too big to be opened by Notepad++"),
|
TEXT("File is too big to be opened by Notepad++"),
|
||||||
TEXT("File open problem"),
|
TEXT("File size problem"),
|
||||||
MB_OK|MB_APPLMODAL);
|
MB_OK|MB_APPLMODAL);
|
||||||
*/
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1459,7 +1458,12 @@ bool FileManager::loadFileData(Document doc, const TCHAR * filename, char* data,
|
|||||||
}
|
}
|
||||||
__except(EXCEPTION_EXECUTE_HANDLER) //TODO: should filter correctly for other exceptions; the old filter(GetExceptionCode(), GetExceptionInformation()) was only catching access violations
|
__except(EXCEPTION_EXECUTE_HANDLER) //TODO: should filter correctly for other exceptions; the old filter(GetExceptionCode(), GetExceptionInformation()) was only catching access violations
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("File is too big to be opened by Notepad++"), TEXT("File open problem"), MB_OK|MB_APPLMODAL);
|
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
|
||||||
|
pNativeSpeaker->messageBox("FileTooBigToOpene",
|
||||||
|
NULL,
|
||||||
|
TEXT("File is too big to be opened by Notepad++"),
|
||||||
|
TEXT("File size problem"),
|
||||||
|
MB_OK | MB_APPLMODAL);
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -815,7 +815,7 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||||||
SendMessage(_shiftTrickUpTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
|
SendMessage(_shiftTrickUpTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
generic_string checkboxTip = pNativeSpeaker->getLocalizedStrFromID("1-to-2-buttons-tip");
|
generic_string checkboxTip = pNativeSpeaker->getLocalizedStrFromID("two-find-buttons-tip");
|
||||||
if (checkboxTip.empty())
|
if (checkboxTip.empty())
|
||||||
checkboxTip = TEXT("2 find buttons mode");
|
checkboxTip = TEXT("2 find buttons mode");
|
||||||
|
|
||||||
|
@ -149,8 +149,6 @@ size_t Printer::doPrint(bool justDoIt)
|
|||||||
const TCHAR *fontFace = (nppGUI._printSettings._headerFontName != TEXT(""))?nppGUI._printSettings._headerFontName.c_str():TEXT("Arial");
|
const TCHAR *fontFace = (nppGUI._printSettings._headerFontName != TEXT(""))?nppGUI._printSettings._headerFontName.c_str():TEXT("Arial");
|
||||||
|
|
||||||
int headerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
|
int headerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
|
||||||
//TCHAR toto[10];
|
|
||||||
//::MessageBox(NULL, itoa(nppGUI._printSettings._headerFontStyle, toto, 10), TEXT("header"), MB_OK);
|
|
||||||
|
|
||||||
HFONT fontHeader = ::CreateFont(headerLineHeight,
|
HFONT fontHeader = ::CreateFont(headerLineHeight,
|
||||||
0, 0, 0,
|
0, 0, 0,
|
||||||
@ -169,7 +167,6 @@ size_t Printer::doPrint(bool justDoIt)
|
|||||||
fontWeight = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_BOLD?FW_BOLD:FW_NORMAL);
|
fontWeight = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_BOLD?FW_BOLD:FW_NORMAL);
|
||||||
isFontItalic = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_ITALIC?TRUE:FALSE);
|
isFontItalic = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_ITALIC?TRUE:FALSE);
|
||||||
fontFace = (nppGUI._printSettings._footerFontName != TEXT(""))?nppGUI._printSettings._footerFontName.c_str():TEXT("Arial");
|
fontFace = (nppGUI._printSettings._footerFontName != TEXT(""))?nppGUI._printSettings._footerFontName.c_str():TEXT("Arial");
|
||||||
//::MessageBox(NULL, itoa(nppGUI._printSettings._footerFontStyle, , 10), TEXT("footer"), MB_OK);
|
|
||||||
|
|
||||||
int footerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
|
int footerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
|
||||||
HFONT fontFooter = ::CreateFont(footerLineHeight,
|
HFONT fontFooter = ::CreateFont(footerLineHeight,
|
||||||
|
@ -859,7 +859,6 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct)
|
|||||||
if (nTab < 0)
|
if (nTab < 0)
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, TEXT("nTab < 0"), TEXT(""), MB_OK);
|
::MessageBox(NULL, TEXT("nTab < 0"), TEXT(""), MB_OK);
|
||||||
//return ::CallWindowProc(_tabBarDefaultProc, hwnd, Message, wParam, lParam);
|
|
||||||
}
|
}
|
||||||
bool isSelected = (nTab == ::SendMessage(_hSelf, TCM_GETCURSEL, 0, 0));
|
bool isSelected = (nTab == ::SendMessage(_hSelf, TCM_GETCURSEL, 0, 0));
|
||||||
|
|
||||||
|
@ -1100,44 +1100,6 @@ generic_string NativeLangSpeaker::getProjectPanelLangMenuStr(const char * nodeNa
|
|||||||
}
|
}
|
||||||
return defaultStr;
|
return defaultStr;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
generic_string NativeLangSpeaker::getFileBrowserLangMenuStr(const char * nodeName, int cmdID, const TCHAR *defaultStr) const
|
|
||||||
{
|
|
||||||
if (!_nativeLangA) return defaultStr;
|
|
||||||
|
|
||||||
TiXmlNodeA *targetNode = _nativeLangA->FirstChild("FileBrowser");
|
|
||||||
if (!targetNode) return defaultStr;
|
|
||||||
|
|
||||||
targetNode = targetNode->FirstChild("Menus");
|
|
||||||
if (!targetNode) return defaultStr;
|
|
||||||
|
|
||||||
targetNode = targetNode->FirstChild(nodeName);
|
|
||||||
if (!targetNode) return defaultStr;
|
|
||||||
|
|
||||||
const char *name = NULL;
|
|
||||||
for (TiXmlNodeA *childNode = targetNode->FirstChildElement("Item");
|
|
||||||
childNode;
|
|
||||||
childNode = childNode->NextSibling("Item"))
|
|
||||||
{
|
|
||||||
TiXmlElementA *element = childNode->ToElement();
|
|
||||||
int id;
|
|
||||||
const char *idStr = element->Attribute("id", &id);
|
|
||||||
|
|
||||||
if (idStr && id == cmdID)
|
|
||||||
{
|
|
||||||
name = element->Attribute("name");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name && name[0])
|
|
||||||
{
|
|
||||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
|
||||||
return wmc->char2wchar(name, _nativeLangEncoding);
|
|
||||||
}
|
|
||||||
return defaultStr;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
generic_string NativeLangSpeaker::getAttrNameStr(const TCHAR *defaultStr, const char *nodeL1Name, const char *nodeL2Name) const
|
generic_string NativeLangSpeaker::getAttrNameStr(const TCHAR *defaultStr, const char *nodeL1Name, const char *nodeL2Name) const
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user