mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 08:14:18 +02:00
Several enhancements for code - part III
This commit is contained in:
parent
bf72b5ec4a
commit
72751182bf
@ -77,7 +77,7 @@ bool isInListA(const char *token, const char *list)
|
|||||||
if ((!token) || (!list))
|
if ((!token) || (!list))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
char word[64] = { '\0' };
|
char word[64] {};
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
size_t j = 0;
|
size_t j = 0;
|
||||||
for (size_t len = strlen(list); i <= len; ++i)
|
for (size_t len = strlen(list); i <= len; ++i)
|
||||||
|
@ -254,7 +254,6 @@ bool Win32_IO_File::write(const void *wbuf, size_t buf_size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_written)
|
|
||||||
_written = true;
|
_written = true;
|
||||||
|
|
||||||
return (total_bytes_written == buf_size);
|
return (total_bytes_written == buf_size);
|
||||||
|
@ -364,11 +364,11 @@ void RegExtDlg::addExt(wchar_t *ext)
|
|||||||
|
|
||||||
if (nRet == ERROR_SUCCESS)
|
if (nRet == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
wchar_t valData[MAX_PATH] = { '\0' };
|
|
||||||
DWORD valDataLen = MAX_PATH * sizeof(wchar_t);
|
|
||||||
|
|
||||||
if (dwDisp == REG_OPENED_EXISTING_KEY)
|
if (dwDisp == REG_OPENED_EXISTING_KEY)
|
||||||
{
|
{
|
||||||
|
wchar_t valData[MAX_PATH] {};
|
||||||
|
DWORD valDataLen = MAX_PATH * sizeof(wchar_t);
|
||||||
|
|
||||||
int res = ::RegQueryValueEx(hKey, L"", nullptr, nullptr, reinterpret_cast<LPBYTE>(valData), &valDataLen);
|
int res = ::RegQueryValueEx(hKey, L"", nullptr, nullptr, reinterpret_cast<LPBYTE>(valData), &valDataLen);
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
::RegSetValueEx(hKey, nppBackup, 0, REG_SZ, reinterpret_cast<LPBYTE>(valData), valDataLen);
|
::RegSetValueEx(hKey, nppBackup, 0, REG_SZ, reinterpret_cast<LPBYTE>(valData), valDataLen);
|
||||||
|
@ -1151,12 +1151,12 @@ int Notepad_plus::getHtmlXmlEncoding(const wchar_t *fileName) const
|
|||||||
_invisibleEditView.execute(SCI_CLEARALL);
|
_invisibleEditView.execute(SCI_CLEARALL);
|
||||||
_invisibleEditView.execute(SCI_APPENDTEXT, lenFile, reinterpret_cast<LPARAM>(data));
|
_invisibleEditView.execute(SCI_APPENDTEXT, lenFile, reinterpret_cast<LPARAM>(data));
|
||||||
|
|
||||||
const char *encodingAliasRegExpr = "[a-zA-Z0-9_-]+";
|
|
||||||
const size_t encodingStrLen = 128;
|
const size_t encodingStrLen = 128;
|
||||||
if (langT == L_XML)
|
if (langT == L_XML)
|
||||||
{
|
{
|
||||||
// find encoding by RegExpr
|
// find encoding by RegExpr
|
||||||
|
|
||||||
|
const char* encodingAliasRegExpr = "[a-zA-Z0-9_-]+";
|
||||||
const char* xmlHeaderRegExpr = "<?xml[ \\t]+version[ \\t]*=[ \\t]*\"[^\"]+\"[ \\t]+encoding[ \\t]*=[ \\t]*\"[^\"]+\"[ \\t]*.*?>";
|
const char* xmlHeaderRegExpr = "<?xml[ \\t]+version[ \\t]*=[ \\t]*\"[^\"]+\"[ \\t]+encoding[ \\t]*=[ \\t]*\"[^\"]+\"[ \\t]*.*?>";
|
||||||
|
|
||||||
size_t startPos = 0;
|
size_t startPos = 0;
|
||||||
@ -5603,17 +5603,19 @@ bool Notepad_plus::doStreamComment()
|
|||||||
bool move_caret = caretPosition < selectionEnd;
|
bool move_caret = caretPosition < selectionEnd;
|
||||||
|
|
||||||
// if there is no selection?
|
// if there is no selection?
|
||||||
if (selectionEnd - selectionStart <= 0)
|
if (selectionEnd <= selectionStart)
|
||||||
{
|
{
|
||||||
auto selLine = _pEditView->execute(SCI_LINEFROMPOSITION, selectionStart);
|
auto selLine = _pEditView->execute(SCI_LINEFROMPOSITION, selectionStart);
|
||||||
selectionStart = _pEditView->execute(SCI_GETLINEINDENTPOSITION, selLine);
|
selectionStart = _pEditView->execute(SCI_GETLINEINDENTPOSITION, selLine);
|
||||||
selectionEnd = _pEditView->execute(SCI_GETLINEENDPOSITION, selLine);
|
selectionEnd = _pEditView->execute(SCI_GETLINEENDPOSITION, selLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
_pEditView->execute(SCI_BEGINUNDOACTION);
|
_pEditView->execute(SCI_BEGINUNDOACTION);
|
||||||
_pEditView->insertGenericTextFrom(selectionStart, start_comment.c_str());
|
_pEditView->insertGenericTextFrom(selectionStart, start_comment.c_str());
|
||||||
selectionEnd += start_comment_length;
|
selectionEnd += start_comment_length;
|
||||||
selectionStart += start_comment_length;
|
selectionStart += start_comment_length;
|
||||||
_pEditView->insertGenericTextFrom(selectionEnd, end_comment.c_str());
|
_pEditView->insertGenericTextFrom(selectionEnd, end_comment.c_str());
|
||||||
|
|
||||||
if (move_caret)
|
if (move_caret)
|
||||||
{
|
{
|
||||||
// moving caret to the beginning of selected block
|
// moving caret to the beginning of selected block
|
||||||
|
@ -1002,7 +1002,6 @@ int Notepad_plus::setFileOpenSaveDlgFilters(CustomFileDialog & fDlg, bool showAl
|
|||||||
const wchar_t *lName = ulc.getName();
|
const wchar_t *lName = ulc.getName();
|
||||||
|
|
||||||
wstring list(L"");
|
wstring list(L"");
|
||||||
if (extList)
|
|
||||||
list += extList;
|
list += extList;
|
||||||
|
|
||||||
wstring stringFilters = exts2Filters(list, showAllExt ? -1 : 40);
|
wstring stringFilters = exts2Filters(list, showAllExt ? -1 : 40);
|
||||||
@ -1679,14 +1678,14 @@ bool Notepad_plus::fileSave(BufferID id)
|
|||||||
}
|
}
|
||||||
else if (backup == bak_verbose)
|
else if (backup == bak_verbose)
|
||||||
{
|
{
|
||||||
constexpr int temBufLen = 32;
|
|
||||||
wchar_t tmpbuf[temBufLen]{};
|
|
||||||
time_t ltime = time(0);
|
time_t ltime = time(0);
|
||||||
const struct tm* today;
|
const struct tm* today;
|
||||||
|
|
||||||
today = localtime(<ime);
|
today = localtime(<ime);
|
||||||
if (today)
|
if (today)
|
||||||
{
|
{
|
||||||
|
constexpr int temBufLen = 32;
|
||||||
|
wchar_t tmpbuf[temBufLen]{};
|
||||||
wcsftime(tmpbuf, temBufLen, L"%Y-%m-%d_%H%M%S", today);
|
wcsftime(tmpbuf, temBufLen, L"%Y-%m-%d_%H%M%S", today);
|
||||||
|
|
||||||
fn_bak += name;
|
fn_bak += name;
|
||||||
|
@ -451,7 +451,7 @@ bool AutoCompletion::showApiAndWordComplete()
|
|||||||
return showAutoComplete(autocFuncAndWord, false);
|
return showAutoComplete(autocFuncAndWord, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoCompletion::getWordArray(vector<wstring> & wordArray, wchar_t *beginChars, wchar_t *allChars)
|
void AutoCompletion::getWordArray(vector<wstring> & wordArray, const wchar_t *beginChars, const wchar_t *allChars)
|
||||||
{
|
{
|
||||||
const size_t bufSize = 256;
|
const size_t bufSize = 256;
|
||||||
const NppGUI & nppGUI = NppParameters::getInstance().getNppGUI();
|
const NppGUI & nppGUI = NppParameters::getInstance().getNppGUI();
|
||||||
@ -1106,15 +1106,16 @@ bool AutoCompletion::setLanguage(LangType language)
|
|||||||
TiXmlNode * pNode = _pXmlFile->FirstChild(L"NotepadPlus");
|
TiXmlNode * pNode = _pXmlFile->FirstChild(L"NotepadPlus");
|
||||||
if (!pNode)
|
if (!pNode)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
pAutoNode = pNode = pNode->FirstChildElement(L"AutoComplete");
|
pAutoNode = pNode = pNode->FirstChildElement(L"AutoComplete");
|
||||||
if (!pNode)
|
if (!pNode)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
pNode = pNode->FirstChildElement(L"KeyWord");
|
pNode = pNode->FirstChildElement(L"KeyWord");
|
||||||
if (!pNode)
|
if (!pNode)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_pXmlKeyword = reinterpret_cast<TiXmlElement *>(pNode);
|
_pXmlKeyword = reinterpret_cast<TiXmlElement *>(pNode);
|
||||||
if (!_pXmlKeyword)
|
|
||||||
return false;
|
|
||||||
_funcCompletionActive = true;
|
_funcCompletionActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1216,7 +1217,7 @@ const wchar_t * AutoCompletion::getApiFileName()
|
|||||||
{
|
{
|
||||||
if (_curLang == L_USER)
|
if (_curLang == L_USER)
|
||||||
{
|
{
|
||||||
Buffer * currentBuf = _pEditView->getCurrentBuffer();
|
const Buffer* currentBuf = _pEditView->getCurrentBuffer();
|
||||||
if (currentBuf->isUserDefineLangExt())
|
if (currentBuf->isUserDefineLangExt())
|
||||||
{
|
{
|
||||||
return currentBuf->getUserDefineLangName();
|
return currentBuf->getUserDefineLangName();
|
||||||
@ -1297,7 +1298,7 @@ void AutoCompletion::setColour(COLORREF colour2Set, AutocompleteColorIndex i)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoCompletion::drawAutocomplete(ScintillaEditView* pEditView)
|
void AutoCompletion::drawAutocomplete(const ScintillaEditView* pEditView)
|
||||||
{
|
{
|
||||||
pEditView->setElementColour(SC_ELEMENT_LIST, _autocompleteText);
|
pEditView->setElementColour(SC_ELEMENT_LIST, _autocompleteText);
|
||||||
pEditView->setElementColour(SC_ELEMENT_LIST_BACK, _autocompleteBg);
|
pEditView->setElementColour(SC_ELEMENT_LIST_BACK, _autocompleteBg);
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
void getCloseTag(char *closeTag, size_t closeTagLen, size_t caretPos, bool isHTML);
|
void getCloseTag(char *closeTag, size_t closeTagLen, size_t caretPos, bool isHTML);
|
||||||
|
|
||||||
static void setColour(COLORREF colour2Set, AutocompleteColorIndex i);
|
static void setColour(COLORREF colour2Set, AutocompleteColorIndex i);
|
||||||
static void drawAutocomplete(ScintillaEditView* pEditView);
|
static void drawAutocomplete(const ScintillaEditView* pEditView);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static COLORREF _autocompleteBg;
|
static COLORREF _autocompleteBg;
|
||||||
@ -113,7 +113,7 @@ private:
|
|||||||
FunctionCallTip _funcCalltip;
|
FunctionCallTip _funcCalltip;
|
||||||
|
|
||||||
const wchar_t * getApiFileName();
|
const wchar_t * getApiFileName();
|
||||||
void getWordArray(std::vector<std::wstring> & wordArray, wchar_t *beginChars, wchar_t *excludeChars);
|
void getWordArray(std::vector<std::wstring> & wordArray, const wchar_t *beginChars, const wchar_t *excludeChars);
|
||||||
|
|
||||||
// Type of autocomplete function
|
// Type of autocomplete function
|
||||||
enum AutocompleteType {
|
enum AutocompleteType {
|
||||||
|
@ -666,7 +666,7 @@ void FileManager::addBufferReference(BufferID buffer, ScintillaEditView * identi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FileManager::closeBuffer(BufferID id, ScintillaEditView * identifier)
|
void FileManager::closeBuffer(BufferID id, const ScintillaEditView* identifier)
|
||||||
{
|
{
|
||||||
int index = getBufferIndexByID(id);
|
int index = getBufferIndexByID(id);
|
||||||
Buffer* buf = getBufferByIndex(index);
|
Buffer* buf = getBufferByIndex(index);
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
|
|
||||||
void beNotifiedOfBufferChange(Buffer * theBuf, int mask);
|
void beNotifiedOfBufferChange(Buffer * theBuf, int mask);
|
||||||
|
|
||||||
void closeBuffer(BufferID, ScintillaEditView * identifer); //called by Notepad++
|
void closeBuffer(BufferID, const ScintillaEditView* identifer); //called by Notepad++
|
||||||
|
|
||||||
void addBufferReference(BufferID id, ScintillaEditView * identifer); //called by Scintilla etc indirectly
|
void addBufferReference(BufferID id, ScintillaEditView * identifer); //called by Scintilla etc indirectly
|
||||||
|
|
||||||
|
@ -99,10 +99,10 @@ int Searching::convertExtendedToString(const wchar_t * query, wchar_t * result,
|
|||||||
{ //query may equal to result, since it always gets smaller
|
{ //query may equal to result, since it always gets smaller
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
int charLeft = length;
|
int charLeft = length;
|
||||||
wchar_t current;
|
|
||||||
while (i < length)
|
while (i < length)
|
||||||
{ //because the backslash escape quences always reduce the size of the wstring, no overflow checks have to be made for target, assuming parameters are correct
|
{ //because the backslash escape quences always reduce the size of the wstring, no overflow checks have to be made for target, assuming parameters are correct
|
||||||
current = query[i];
|
wchar_t current = query[i];
|
||||||
--charLeft;
|
--charLeft;
|
||||||
if (current == '\\' && charLeft)
|
if (current == '\\' && charLeft)
|
||||||
{ //possible escape sequence
|
{ //possible escape sequence
|
||||||
@ -193,10 +193,10 @@ bool Searching::readBase(const wchar_t * str, int * value, int base, int size)
|
|||||||
int i = 0, temp = 0;
|
int i = 0, temp = 0;
|
||||||
*value = 0;
|
*value = 0;
|
||||||
wchar_t max = '0' + static_cast<wchar_t>(base) - 1;
|
wchar_t max = '0' + static_cast<wchar_t>(base) - 1;
|
||||||
wchar_t current;
|
|
||||||
while (i < size)
|
while (i < size)
|
||||||
{
|
{
|
||||||
current = str[i];
|
wchar_t current = str[i];
|
||||||
if (current >= 'A')
|
if (current >= 'A')
|
||||||
{
|
{
|
||||||
current &= 0xdf;
|
current &= 0xdf;
|
||||||
@ -3237,7 +3237,6 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl
|
|||||||
}
|
}
|
||||||
|
|
||||||
intptr_t targetStart = 0;
|
intptr_t targetStart = 0;
|
||||||
intptr_t targetEnd = 0;
|
|
||||||
|
|
||||||
//Initial range for searching
|
//Initial range for searching
|
||||||
pEditView->execute(SCI_SETSEARCHFLAGS, flags);
|
pEditView->execute(SCI_SETSEARCHFLAGS, flags);
|
||||||
@ -3260,7 +3259,7 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl
|
|||||||
if (targetStart == FIND_INVALID_REGULAR_EXPRESSION)
|
if (targetStart == FIND_INVALID_REGULAR_EXPRESSION)
|
||||||
return FIND_INVALID_REGULAR_EXPRESSION;
|
return FIND_INVALID_REGULAR_EXPRESSION;
|
||||||
|
|
||||||
targetEnd = pEditView->execute(SCI_GETTARGETEND);
|
intptr_t targetEnd = pEditView->execute(SCI_GETTARGETEND);
|
||||||
|
|
||||||
if (targetEnd > findReplaceInfo._endRange)
|
if (targetEnd > findReplaceInfo._endRange)
|
||||||
{
|
{
|
||||||
|
@ -154,11 +154,11 @@ bool FunctionCallTip::getCursorFunction()
|
|||||||
//token is identifier or some expression, whitespace is ignored
|
//token is identifier or some expression, whitespace is ignored
|
||||||
std::vector< Token > tokenVector;
|
std::vector< Token > tokenVector;
|
||||||
int tokenLen = 0;
|
int tokenLen = 0;
|
||||||
wchar_t ch;
|
|
||||||
for (int i = 0; i < offset; ++i) //we dont care about stuff after the offset
|
for (int i = 0; i < offset; ++i) //we dont care about stuff after the offset
|
||||||
{
|
{
|
||||||
//tokenVector.push_back(pair(lineData+i, len));
|
//tokenVector.push_back(pair(lineData+i, len));
|
||||||
ch = lineData[i];
|
wchar_t ch = lineData[i];
|
||||||
if (isBasicWordChar(ch) || isAdditionalWordChar(ch)) //part of identifier
|
if (isBasicWordChar(ch) || isAdditionalWordChar(ch)) //part of identifier
|
||||||
{
|
{
|
||||||
tokenLen = 0;
|
tokenLen = 0;
|
||||||
|
@ -3658,12 +3658,12 @@ intptr_t CALLBACK LanguageSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
|||||||
//
|
//
|
||||||
for (int i = L_TEXT ; i < nppParam.L_END ; ++i)
|
for (int i = L_TEXT ; i < nppParam.L_END ; ++i)
|
||||||
{
|
{
|
||||||
wstring str;
|
|
||||||
if (static_cast<LangType>(i) != L_USER)
|
if (static_cast<LangType>(i) != L_USER)
|
||||||
{
|
{
|
||||||
int cmdID = nppParam.langTypeToCommandID(static_cast<LangType>(i));
|
int cmdID = nppParam.langTypeToCommandID(static_cast<LangType>(i));
|
||||||
if ((cmdID != -1))
|
if ((cmdID != -1))
|
||||||
{
|
{
|
||||||
|
wstring str;
|
||||||
getNameStrFromCmd(cmdID, str);
|
getNameStrFromCmd(cmdID, str);
|
||||||
if (str.length() > 0)
|
if (str.length() > 0)
|
||||||
{
|
{
|
||||||
|
@ -455,7 +455,7 @@ void ProjectPanel::buildProjectXml(TiXmlNode *node, HTREEITEM hItem, const wchar
|
|||||||
SendMessage(_treeView.getHSelf(), TVM_GETITEM, 0, reinterpret_cast<LPARAM>(&tvItem));
|
SendMessage(_treeView.getHSelf(), TVM_GETITEM, 0, reinterpret_cast<LPARAM>(&tvItem));
|
||||||
if (tvItem.lParam)
|
if (tvItem.lParam)
|
||||||
{
|
{
|
||||||
wstring *fn = (wstring *)tvItem.lParam;
|
const wstring *fn = reinterpret_cast<const wstring *>(tvItem.lParam);
|
||||||
wstring newFn = getRelativePath(*fn, fn2write);
|
wstring newFn = getRelativePath(*fn, fn2write);
|
||||||
TiXmlNode *fileLeaf = node->InsertEndChild(TiXmlElement(L"File"));
|
TiXmlNode *fileLeaf = node->InsertEndChild(TiXmlElement(L"File"));
|
||||||
fileLeaf->ToElement()->SetAttribute(L"name", newFn.c_str());
|
fileLeaf->ToElement()->SetAttribute(L"name", newFn.c_str());
|
||||||
@ -1215,9 +1215,10 @@ bool ProjectPanel::saveWorkSpaceAs(bool saveCopyAs)
|
|||||||
void ProjectPanel::setFileExtFilter(CustomFileDialog & fDlg)
|
void ProjectPanel::setFileExtFilter(CustomFileDialog & fDlg)
|
||||||
{
|
{
|
||||||
const wchar_t *ext = NppParameters::getInstance().getNppGUI()._definedWorkspaceExt.c_str();
|
const wchar_t *ext = NppParameters::getInstance().getNppGUI()._definedWorkspaceExt.c_str();
|
||||||
wstring workspaceExt = L"";
|
|
||||||
if (*ext != '\0')
|
if (*ext != '\0')
|
||||||
{
|
{
|
||||||
|
wstring workspaceExt = L"";
|
||||||
|
|
||||||
if (*ext != '.')
|
if (*ext != '.')
|
||||||
workspaceExt += L".";
|
workspaceExt += L".";
|
||||||
workspaceExt += ext;
|
workspaceExt += ext;
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
_hParent = parent2set;
|
_hParent = parent2set;
|
||||||
};
|
};
|
||||||
|
|
||||||
void setPanelTitle(std::wstring title) {
|
void setPanelTitle(const std::wstring& title) {
|
||||||
_panelTitle = title;
|
_panelTitle = title;
|
||||||
};
|
};
|
||||||
const wchar_t * getPanelTitle() const {
|
const wchar_t * getPanelTitle() const {
|
||||||
|
@ -87,7 +87,7 @@ void ToolBar::initTheme(TiXmlDocument *toolIconsDocRoot)
|
|||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
wstring disabled_suffix = L"_disabled";
|
wstring disabled_suffix = L"_disabled";
|
||||||
wstring ext = L".ico";
|
wstring ext = L".ico";
|
||||||
for (ToolbarIconIdUnit icoUnit : toolbarIconIDs)
|
for (const ToolbarIconIdUnit& icoUnit : toolbarIconIDs)
|
||||||
{
|
{
|
||||||
wstring locator = iconFolderDir;
|
wstring locator = iconFolderDir;
|
||||||
locator += L"\\";
|
locator += L"\\";
|
||||||
|
@ -281,7 +281,7 @@ HTREEITEM TreeView::searchSubItemByName(const wchar_t *itemName, HTREEITEM hPare
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TreeView::setImageList(std::vector<int> imageIds, int imgSize)
|
bool TreeView::setImageList(const std::vector<int>& imageIds, int imgSize)
|
||||||
{
|
{
|
||||||
const int nbImage = static_cast<int>(imageIds.size());
|
const int nbImage = static_cast<int>(imageIds.size());
|
||||||
if (imgSize <= 0)
|
if (imgSize <= 0)
|
||||||
|
@ -116,7 +116,7 @@ public:
|
|||||||
bool searchLeafAndBuildTree(const TreeView & tree2Build, const std::wstring & text2Search, int index2Search);
|
bool searchLeafAndBuildTree(const TreeView & tree2Build, const std::wstring & text2Search, int index2Search);
|
||||||
void sort(HTREEITEM hTreeItem, bool isRecusive);
|
void sort(HTREEITEM hTreeItem, bool isRecusive);
|
||||||
void customSorting(HTREEITEM hTreeItem, PFNTVCOMPARE sortingCallbackFunc, LPARAM lParam, bool isRecursive);
|
void customSorting(HTREEITEM hTreeItem, PFNTVCOMPARE sortingCallbackFunc, LPARAM lParam, bool isRecursive);
|
||||||
bool setImageList(std::vector<int> imageIds, int imgSize = 0);
|
bool setImageList(const std::vector<int>& imageIds, int imgSize = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HIMAGELIST _hImaLst = nullptr;
|
HIMAGELIST _hImaLst = nullptr;
|
||||||
|
@ -533,7 +533,7 @@ intptr_t CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam,
|
|||||||
void VerticalFileSwitcher::initPopupMenus()
|
void VerticalFileSwitcher::initPopupMenus()
|
||||||
{
|
{
|
||||||
NativeLangSpeaker* pNativeSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
NativeLangSpeaker* pNativeSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
||||||
NppGUI& nppGUI = NppParameters::getInstance().getNppGUI();
|
const NppGUI& nppGUI = NppParameters::getInstance().getNppGUI();
|
||||||
|
|
||||||
wstring extStr = pNativeSpeaker->getAttrNameStr(L"Ext.", FS_ROOTNODE, FS_CLMNEXT);
|
wstring extStr = pNativeSpeaker->getAttrNameStr(L"Ext.", FS_ROOTNODE, FS_CLMNEXT);
|
||||||
wstring pathStr = pNativeSpeaker->getAttrNameStr(L"Path", FS_ROOTNODE, FS_CLMNPATH);
|
wstring pathStr = pNativeSpeaker->getAttrNameStr(L"Path", FS_ROOTNODE, FS_CLMNPATH);
|
||||||
|
@ -131,7 +131,7 @@ void parseCommandLine(const wchar_t* commandLine, ParamVector& paramVector)
|
|||||||
++zArg; // zArg == 2
|
++zArg; // zArg == 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isBetweenFileNameQuotes)
|
else //if (isBetweenFileNameQuotes)
|
||||||
{
|
{
|
||||||
isBetweenFileNameQuotes = false;
|
isBetweenFileNameQuotes = false;
|
||||||
//because we dont want to leave in any quotes in the filename, remove them now (with zero terminator)
|
//because we dont want to leave in any quotes in the filename, remove them now (with zero terminator)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user