[BUG_FIXED] Fix sort settings bug in function list while reloading.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1137 f5eea248-9336-0410-98b8-ebc06183d4e3remotes/trunk
parent
641c1af0e1
commit
81f5a3613e
|
@ -71,13 +71,8 @@ int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector<generic_strin
|
||||||
throw generic_string(TEXT("Load Library is failed.\nMake \"Runtime Library\" setting of this project as \"Multi-threaded(/MT)\" may cure this problem."));
|
throw generic_string(TEXT("Load Library is failed.\nMake \"Runtime Library\" setting of this project as \"Multi-threaded(/MT)\" may cure this problem."));
|
||||||
|
|
||||||
pi->_pFuncIsUnicode = (PFUNCISUNICODE)GetProcAddress(pi->_hLib, "isUnicode");
|
pi->_pFuncIsUnicode = (PFUNCISUNICODE)GetProcAddress(pi->_hLib, "isUnicode");
|
||||||
#ifdef UNICODE
|
|
||||||
if (!pi->_pFuncIsUnicode || !pi->_pFuncIsUnicode())
|
if (!pi->_pFuncIsUnicode || !pi->_pFuncIsUnicode())
|
||||||
throw generic_string(TEXT("This ANSI plugin is not compatible with your Unicode Notepad++."));
|
throw generic_string(TEXT("This ANSI plugin is not compatible with your Unicode Notepad++."));
|
||||||
#else
|
|
||||||
if (pi->_pFuncIsUnicode)
|
|
||||||
throw generic_string(TEXT("This Unicode plugin is not compatible with your ANSI mode Notepad++."));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pi->_pFuncSetInfo = (PFUNCSETINFO)GetProcAddress(pi->_hLib, "setInfo");
|
pi->_pFuncSetInfo = (PFUNCSETINFO)GetProcAddress(pi->_hLib, "setInfo");
|
||||||
|
|
||||||
|
@ -133,18 +128,13 @@ int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector<generic_strin
|
||||||
NppParameters * nppParams = NppParameters::getInstance();
|
NppParameters * nppParams = NppParameters::getInstance();
|
||||||
|
|
||||||
ExternalLangContainer *containers[30];
|
ExternalLangContainer *containers[30];
|
||||||
#ifdef UNICODE
|
|
||||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
||||||
#endif
|
|
||||||
for (int x = 0; x < numLexers; ++x)
|
for (int x = 0; x < numLexers; ++x)
|
||||||
{
|
{
|
||||||
GetLexerName(x, lexName, MAX_EXTERNAL_LEXER_NAME_LEN);
|
GetLexerName(x, lexName, MAX_EXTERNAL_LEXER_NAME_LEN);
|
||||||
GetLexerStatusText(x, lexDesc, MAX_EXTERNAL_LEXER_DESC_LEN);
|
GetLexerStatusText(x, lexDesc, MAX_EXTERNAL_LEXER_DESC_LEN);
|
||||||
#ifdef UNICODE
|
|
||||||
const TCHAR *pLexerName = wmc->char2wchar(lexName, CP_ACP);
|
const TCHAR *pLexerName = wmc->char2wchar(lexName, CP_ACP);
|
||||||
#else
|
|
||||||
const TCHAR *pLexerName = lexName;
|
|
||||||
#endif
|
|
||||||
if (!nppParams->isExistingExternalLangName(pLexerName) && nppParams->ExternalLangHasRoom())
|
if (!nppParams->isExistingExternalLangName(pLexerName) && nppParams->ExternalLangHasRoom())
|
||||||
containers[x] = new ExternalLangContainer(pLexerName, lexDesc);
|
containers[x] = new ExternalLangContainer(pLexerName, lexDesc);
|
||||||
else
|
else
|
||||||
|
@ -188,11 +178,7 @@ int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector<generic_strin
|
||||||
|
|
||||||
nppParams->getExternalLexerFromXmlTree(pXmlDoc);
|
nppParams->getExternalLexerFromXmlTree(pXmlDoc);
|
||||||
nppParams->getExternalLexerDoc()->push_back(pXmlDoc);
|
nppParams->getExternalLexerDoc()->push_back(pXmlDoc);
|
||||||
#ifdef UNICODE
|
|
||||||
const char *pDllName = wmc->wchar2char(pluginFilePath, CP_ACP);
|
const char *pDllName = wmc->wchar2char(pluginFilePath, CP_ACP);
|
||||||
#else
|
|
||||||
const char *pDllName = pluginFilePath;
|
|
||||||
#endif
|
|
||||||
::SendMessage(_nppData._scintillaMainHandle, SCI_LOADLEXERLIBRARY, 0, (LPARAM)pDllName);
|
::SendMessage(_nppData._scintillaMainHandle, SCI_LOADLEXERLIBRARY, 0, (LPARAM)pDllName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,7 +434,7 @@ Buffer * FileManager::getBufferByIndex(int index) {
|
||||||
|
|
||||||
void FileManager::beNotifiedOfBufferChange(Buffer * theBuf, int mask) {
|
void FileManager::beNotifiedOfBufferChange(Buffer * theBuf, int mask) {
|
||||||
_pNotepadPlus->notifyBufferChanged(theBuf, mask);
|
_pNotepadPlus->notifyBufferChanged(theBuf, mask);
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileManager::addBufferReference(BufferID buffer, ScintillaEditView * identifier) {
|
void FileManager::addBufferReference(BufferID buffer, ScintillaEditView * identifier) {
|
||||||
Buffer * buf = getBufferByID(buffer);
|
Buffer * buf = getBufferByID(buffer);
|
||||||
|
|
|
@ -290,8 +290,13 @@ void FunctionListPanel::reload()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
::SendMessage(_hSearchEdit, WM_SETTEXT, 0, (LPARAM)(previousParams->_searchParameters)._text2Find.c_str());
|
::SendMessage(_hSearchEdit, WM_SETTEXT, 0, (LPARAM)(previousParams->_searchParameters)._text2Find.c_str());
|
||||||
setSort((previousParams->_searchParameters)._doSort);
|
|
||||||
_treeView.restoreFoldingStateFrom(previousParams->_treeState, root);
|
_treeView.restoreFoldingStateFrom(previousParams->_treeState, root);
|
||||||
|
|
||||||
|
bool isSort = (previousParams->_searchParameters)._doSort;
|
||||||
|
setSort(isSort);
|
||||||
|
if (isSort)
|
||||||
|
_pTreeView->sort(_pTreeView->getRoot());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue