[BUG_FIXED] Fix ANSI replace/replace all bug.

[NEW_FEATURE] Add find/replace dialog memorize capacity.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@342 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-10-16 21:57:08 +00:00
parent d2c8c52c51
commit c16b93830a
7 changed files with 265 additions and 10 deletions

View File

@ -1414,6 +1414,12 @@ bool Notepad_plus::matchInList(const TCHAR *fileName, const vector<generic_strin
return false; return false;
} }
void Notepad_plus::saveFindHistory()
{
_findReplaceDlg.saveFindHistory();
(NppParameters::getInstance())->writeFindHistory();
}
void Notepad_plus::saveUserDefineLangs() void Notepad_plus::saveUserDefineLangs()
{ {
if (ScintillaEditView::getUserDefineDlg()->isDirty()) if (ScintillaEditView::getUserDefineDlg()->isDirty())
@ -7771,6 +7777,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
scnN.nmhdr.idFrom = 0; scnN.nmhdr.idFrom = 0;
_pluginsManager.notify(&scnN); _pluginsManager.notify(&scnN);
saveFindHistory();
_lastRecentFileList.saveLRFL(); _lastRecentFileList.saveLRFL();
saveScintillaParams(SCIV_PRIMARY); saveScintillaParams(SCIV_PRIMARY);
saveScintillaParams(SCIV_SECOND); saveScintillaParams(SCIV_SECOND);

View File

@ -153,6 +153,8 @@ public:
inline void saveSession(const Session & session); inline void saveSession(const Session & session);
inline void saveFindHistory();
void getCurrentOpenedFiles(Session & session); void getCurrentOpenedFiles(Session & session);
bool fileLoadSession(const TCHAR *fn = NULL); bool fileLoadSession(const TCHAR *fn = NULL);

View File

@ -425,6 +425,11 @@ NppParameters::NppParameters() : _pXmlDoc(NULL),_pXmlUserDoc(NULL), _pXmlUserSty
_transparentFuncAddr(NULL), _enableThemeDialogTextureFuncAddr(NULL),\ _transparentFuncAddr(NULL), _enableThemeDialogTextureFuncAddr(NULL),\
_isTaskListRBUTTONUP_Active(false), _fileSaveDlgFilterIndex(-1), _asNotepadStyle(false) _isTaskListRBUTTONUP_Active(false), _fileSaveDlgFilterIndex(-1), _asNotepadStyle(false)
{ {
_findHistory.nbFindHistoryPath = 0;
_findHistory.nbFindHistoryFilter = 0;
_findHistory.nbFindHistoryFind = 0;
_findHistory.nbFindHistoryReplace = 0;
//Get windows version //Get windows version
_winVersion = getWindowsVersion(); _winVersion = getWindowsVersion();
@ -906,6 +911,10 @@ bool NppParameters::getUserParametersFromXmlTree()
TiXmlElement HistoryNode(TEXT("History")); TiXmlElement HistoryNode(TEXT("History"));
root->InsertEndChild(HistoryNode); root->InsertEndChild(HistoryNode);
//Find history
feedFindHistoryParameters(root);
return true; return true;
} }
@ -1298,6 +1307,77 @@ void NppParameters::feedFileListParameters(TiXmlNode *node)
} }
} }
void NppParameters::feedFindHistoryParameters(TiXmlNode *node)
{
_findHistory.nbMaxFindHistoryPath = 10;
_findHistory.nbMaxFindHistoryFilter = 10;
_findHistory.nbMaxFindHistoryFind = 10;
_findHistory.nbMaxFindHistoryReplace = 10;
TiXmlNode *findHistoryRoot = node->FirstChildElement(TEXT("FindHistory"));
if (!findHistoryRoot) return;
(findHistoryRoot->ToElement())->Attribute(TEXT("nbMaxFindHistoryPath"), &_findHistory.nbMaxFindHistoryPath);
if ((_findHistory.nbMaxFindHistoryPath > 0) && (_findHistory.nbMaxFindHistoryPath <= NB_MAX_FINDHISTORY_PATH))
{
for (TiXmlNode *childNode = findHistoryRoot->FirstChildElement(TEXT("Path"));
childNode && (_findHistory.nbFindHistoryPath < NB_MAX_FINDHISTORY_PATH);
childNode = childNode->NextSibling(TEXT("Path")) )
{
const TCHAR *filePath = (childNode->ToElement())->Attribute(TEXT("name"));
if (filePath)
{
_findHistory.FindHistoryPath[_findHistory.nbFindHistoryPath++] = new generic_string(filePath);
}
}
}
(findHistoryRoot->ToElement())->Attribute(TEXT("nbMaxFindHistoryFilter"), &_findHistory.nbMaxFindHistoryFilter);
if ((_findHistory.nbMaxFindHistoryFilter > 0) && (_findHistory.nbMaxFindHistoryFilter <= NB_MAX_FINDHISTORY_FILTER))
{
for (TiXmlNode *childNode = findHistoryRoot->FirstChildElement(TEXT("Filter"));
childNode && (_findHistory.nbFindHistoryFilter < NB_MAX_FINDHISTORY_FILTER);
childNode = childNode->NextSibling(TEXT("Filter")))
{
const TCHAR *fileFilter = (childNode->ToElement())->Attribute(TEXT("name"));
if (fileFilter)
{
_findHistory.FindHistoryFilter[_findHistory.nbFindHistoryFilter++] = new generic_string(fileFilter);
}
}
}
(findHistoryRoot->ToElement())->Attribute(TEXT("nbMaxFindHistoryFind"), &_findHistory.nbMaxFindHistoryFind);
if ((_findHistory.nbMaxFindHistoryFind > 0) && (_findHistory.nbMaxFindHistoryFind <= NB_MAX_FINDHISTORY_FIND))
{
for (TiXmlNode *childNode = findHistoryRoot->FirstChildElement(TEXT("Find"));
childNode && (_findHistory.nbFindHistoryFind < NB_MAX_FINDHISTORY_FIND);
childNode = childNode->NextSibling(TEXT("Find")))
{
const TCHAR *fileFind = (childNode->ToElement())->Attribute(TEXT("name"));
if (fileFind)
{
_findHistory.FindHistoryFind[_findHistory.nbFindHistoryFind++] = new generic_string(fileFind);
}
}
}
(findHistoryRoot->ToElement())->Attribute(TEXT("nbMaxFindHistoryReplace"), &_findHistory.nbMaxFindHistoryReplace);
if ((_findHistory.nbMaxFindHistoryReplace > 0) && (_findHistory.nbMaxFindHistoryReplace <= NB_MAX_FINDHISTORY_REPLACE))
{
for (TiXmlNode *childNode = findHistoryRoot->FirstChildElement(TEXT("Replace"));
childNode && (_findHistory.nbFindHistoryReplace < NB_MAX_FINDHISTORY_REPLACE);
childNode = childNode->NextSibling(TEXT("Replace")))
{
const TCHAR *fileReplace = (childNode->ToElement())->Attribute(TEXT("name"));
if (fileReplace)
{
_findHistory.FindHistoryReplace[_findHistory.nbFindHistoryReplace++] = new generic_string(fileReplace);
}
}
}
}
void NppParameters::feedShortcut(TiXmlNode *node) void NppParameters::feedShortcut(TiXmlNode *node)
{ {
TiXmlNode *shortcutsRoot = node->FirstChildElement(TEXT("InternalCommands")); TiXmlNode *shortcutsRoot = node->FirstChildElement(TEXT("InternalCommands"));
@ -3756,6 +3836,62 @@ bool NppParameters::writeGUIParams()
return true; return true;
} }
bool NppParameters::writeFindHistory()
{
if (!_pXmlUserDoc) return false;
TiXmlNode *nppRoot = _pXmlUserDoc->FirstChild(TEXT("NotepadPlus"));
if (!nppRoot) return false;
TiXmlNode *findHistoryRoot = nppRoot->FirstChildElement(TEXT("FindHistory"));
if (!findHistoryRoot)
{
TiXmlElement element(TEXT("FindHistory"));
findHistoryRoot = nppRoot->InsertEndChild(element);
}
int i;
findHistoryRoot->Clear();
(findHistoryRoot->ToElement())->SetAttribute(TEXT("nbMaxFindHistoryPath"), _findHistory.nbMaxFindHistoryPath);
(findHistoryRoot->ToElement())->SetAttribute(TEXT("nbMaxFindHistoryFilter"), _findHistory.nbMaxFindHistoryFilter);
(findHistoryRoot->ToElement())->SetAttribute(TEXT("nbMaxFindHistoryFind"), _findHistory.nbMaxFindHistoryFind);
(findHistoryRoot->ToElement())->SetAttribute(TEXT("nbMaxFindHistoryReplace"), _findHistory.nbMaxFindHistoryReplace);
TiXmlElement hist_element(TEXT(""));
hist_element.SetValue(TEXT("Path"));
for (i = 0; i < _findHistory.nbFindHistoryPath; i++)
{
(hist_element.ToElement())->SetAttribute(TEXT("name"), _findHistory.FindHistoryPath[i]->c_str());
findHistoryRoot->InsertEndChild(hist_element);
}
hist_element.SetValue(TEXT("Filter"));
for (i = 0; i < _findHistory.nbFindHistoryFilter; i++)
{
(hist_element.ToElement())->SetAttribute(TEXT("name"), _findHistory.FindHistoryFilter[i]->c_str());
findHistoryRoot->InsertEndChild(hist_element);
}
hist_element.SetValue(TEXT("Find"));
for (i = 0; i < _findHistory.nbFindHistoryFind; i++)
{
(hist_element.ToElement())->SetAttribute(TEXT("name"), _findHistory.FindHistoryFind[i]->c_str());
findHistoryRoot->InsertEndChild(hist_element);
}
hist_element.SetValue(TEXT("Replace"));
for (i = 0; i < _findHistory.nbFindHistoryReplace; i++)
{
(hist_element.ToElement())->SetAttribute(TEXT("name"), _findHistory.FindHistoryReplace[i]->c_str());
findHistoryRoot->InsertEndChild(hist_element);
}
return true;
}
void NppParameters::insertDockingParamNode(TiXmlNode *GUIRoot) void NppParameters::insertDockingParamNode(TiXmlNode *GUIRoot)
{ {
TiXmlElement DMNode(TEXT("GUIConfig")); TiXmlElement DMNode(TEXT("GUIConfig"));

View File

@ -642,6 +642,11 @@ const int NB_MAX_USER_LANG = 30;
const int NB_MAX_EXTERNAL_LANG = 30; const int NB_MAX_EXTERNAL_LANG = 30;
const int LANG_NAME_LEN = 32; const int LANG_NAME_LEN = 32;
const int NB_MAX_FINDHISTORY_FIND = 30;
const int NB_MAX_FINDHISTORY_REPLACE = 30;
const int NB_MAX_FINDHISTORY_PATH = 30;
const int NB_MAX_FINDHISTORY_FILTER = 20;
struct Lang struct Lang
{ {
LangType _langID; LangType _langID;
@ -775,6 +780,24 @@ public:
}; };
}; };
struct FindHistory {
int nbMaxFindHistoryPath;
int nbMaxFindHistoryFilter;
int nbMaxFindHistoryFind;
int nbMaxFindHistoryReplace;
int nbFindHistoryPath;
int nbFindHistoryFilter;
int nbFindHistoryFind;
int nbFindHistoryReplace;
generic_string *FindHistoryPath[NB_MAX_FINDHISTORY_PATH];
generic_string *FindHistoryFilter[NB_MAX_FINDHISTORY_FILTER];
generic_string *FindHistoryFind[NB_MAX_FINDHISTORY_FIND];
generic_string *FindHistoryReplace[NB_MAX_FINDHISTORY_REPLACE];
};
const int NB_LANG = 80; const int NB_LANG = 80;
const bool DUP = true; const bool DUP = true;
@ -927,6 +950,7 @@ public:
void writeUserDefinedLang(); void writeUserDefinedLang();
void writeShortcuts(); void writeShortcuts();
void writeSession(const Session & session, const TCHAR *fileName = NULL); void writeSession(const Session & session, const TCHAR *fileName = NULL);
bool writeFindHistory();
bool isExistingUserLangName(const TCHAR *newName) const { bool isExistingUserLangName(const TCHAR *newName) const {
@ -1086,8 +1110,9 @@ public:
} }
bool getContextMenuFromXmlTree(HMENU mainMenuHadle); bool getContextMenuFromXmlTree(HMENU mainMenuHadle);
winVer getWinVersion() { return _winVersion;};
FindHistory & getFindHistory() {return _findHistory;};
winVer getWinVersion() { return _winVersion; };
private: private:
NppParameters(); NppParameters();
~NppParameters(); ~NppParameters();
@ -1108,6 +1133,8 @@ private:
int _nbFile; int _nbFile;
int _nbMaxFile; int _nbMaxFile;
FindHistory _findHistory;
UserLangContainer *_userLangArray[NB_MAX_USER_LANG]; UserLangContainer *_userLangArray[NB_MAX_USER_LANG];
int _nbUserLang; int _nbUserLang;
TCHAR _userDefineLangPath[MAX_PATH]; TCHAR _userDefineLangPath[MAX_PATH];
@ -1194,6 +1221,7 @@ private:
void feedFileListParameters(TiXmlNode *node); void feedFileListParameters(TiXmlNode *node);
void feedScintillaParam(bool whichOne, TiXmlNode *node); void feedScintillaParam(bool whichOne, TiXmlNode *node);
void feedDockingManager(TiXmlNode *node); void feedDockingManager(TiXmlNode *node);
void feedFindHistoryParameters(TiXmlNode *node);
bool feedStylerArray(TiXmlNode *node); bool feedStylerArray(TiXmlNode *node);
void getAllWordStyles(TCHAR *lexerName, TiXmlNode *lexerNode); void getAllWordStyles(TCHAR *lexerName, TiXmlNode *lexerNode);

View File

@ -252,6 +252,7 @@ generic_string FindReplaceDlg::getTextFromCombo(HWND hCombo, bool isUnicode) con
{ {
::SendMessage(hCombo, WM_GETTEXT, MAX_PATH - 1, (LPARAM)str); ::SendMessage(hCombo, WM_GETTEXT, MAX_PATH - 1, (LPARAM)str);
} }
#endif #endif
return generic_string(str); return generic_string(str);
} }
@ -310,6 +311,8 @@ void FindReplaceDlg::create(int dialogID, bool isRTL)
_tab.reSizeTo(rect); _tab.reSizeTo(rect);
_tab.display(); _tab.display();
fillFindHistory();
ETDTProc enableDlgTheme = (ETDTProc)::SendMessage(_hParent, NPPM_GETENABLETHEMETEXTUREFUNC, 0, 0); ETDTProc enableDlgTheme = (ETDTProc)::SendMessage(_hParent, NPPM_GETENABLETHEMETEXTUREFUNC, 0, 0);
if (enableDlgTheme) if (enableDlgTheme)
enableDlgTheme(_hSelf, ETDT_ENABLETAB); enableDlgTheme(_hSelf, ETDT_ENABLETAB);
@ -317,14 +320,76 @@ void FindReplaceDlg::create(int dialogID, bool isRTL)
goToCenter(); goToCenter();
} }
void FindReplaceDlg::fillFindHistory()
{
FindHistory& findHistory = (NppParameters::getInstance())->getFindHistory();
fillComboHistory(IDD_FINDINFILES_DIR_COMBO, findHistory.nbFindHistoryPath, findHistory.FindHistoryPath);
fillComboHistory(IDD_FINDINFILES_FILTERS_COMBO, findHistory.nbFindHistoryFilter, findHistory.FindHistoryFilter);
fillComboHistory(IDFINDWHAT, findHistory.nbFindHistoryFind, findHistory.FindHistoryFind);
fillComboHistory(IDREPLACEWITH, findHistory.nbFindHistoryReplace, findHistory.FindHistoryReplace);
}
void FindReplaceDlg::fillComboHistory(int id, int count, generic_string **pStrings)
{
int i;
bool isUnicode = false;
HWND hCombo;
hCombo = ::GetDlgItem(_hSelf, id);
for (i = 0; i < count; i++)
{
addText2Combo(pStrings[i]->c_str(), hCombo, isUnicode);
}
::SendMessage(hCombo, CB_SETCURSEL, 0, 0); // select first item
}
void FindReplaceDlg::saveFindHistory()
{
if (! isCreated()) return;
FindHistory& findHistory = (NppParameters::getInstance())->getFindHistory();
saveComboHistory(IDD_FINDINFILES_DIR_COMBO, findHistory.nbMaxFindHistoryPath, findHistory.nbFindHistoryPath, findHistory.FindHistoryPath);
saveComboHistory(IDD_FINDINFILES_FILTERS_COMBO, findHistory.nbMaxFindHistoryFilter, findHistory.nbFindHistoryFilter, findHistory.FindHistoryFilter);
saveComboHistory(IDFINDWHAT, findHistory.nbMaxFindHistoryFind, findHistory.nbFindHistoryFind, findHistory.FindHistoryFind);
saveComboHistory(IDREPLACEWITH, findHistory.nbMaxFindHistoryReplace, findHistory.nbFindHistoryReplace, findHistory.FindHistoryReplace);
}
void FindReplaceDlg::saveComboHistory(int id, int maxcount, int& oldcount, generic_string **pStrings)
{
int i, count;
bool isUnicode = false;
HWND hCombo;
TCHAR text[500]; //yniq - any need for dynamic allocation?
hCombo = ::GetDlgItem(_hSelf, id);
count = ::SendMessage(hCombo, CB_GETCOUNT, 0, 0);
count = min(count, maxcount);
for (i = 0; i < count; i++)
{
::SendMessage(hCombo, CB_GETLBTEXT, i, (LPARAM) text);
if (i < oldcount)
*pStrings[i] = text;
else
pStrings[i] = new generic_string(text);
}
for (; i < oldcount; i++) delete pStrings[i];
oldcount = count;
}
void FindReplaceDlg::updateCombos() void FindReplaceDlg::updateCombos()
{ {
/*
bool isUnicode = (*_ppEditView)->getCurrentBuffer()->getUnicodeMode() != uni8Bit; bool isUnicode = (*_ppEditView)->getCurrentBuffer()->getUnicodeMode() != uni8Bit;
HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH); HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH);
addText2Combo(getTextFromCombo(hReplaceCombo).c_str(), hReplaceCombo, isUnicode); addText2Combo(getTextFromCombo(hReplaceCombo).c_str(), hReplaceCombo, isUnicode);
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT); HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
addText2Combo(getTextFromCombo(hFindCombo).c_str(), hFindCombo, isUnicode); addText2Combo(getTextFromCombo(hFindCombo).c_str(), hFindCombo, isUnicode);
*/
updateCombo(IDREPLACEWITH);
updateCombo(IDFINDWHAT);
} }
bool Finder::notify(SCNotification *notification) bool Finder::notify(SCNotification *notification)
@ -546,10 +611,11 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
{ {
if (_currentStatus == REPLACE_DLG) if (_currentStatus == REPLACE_DLG)
{ {
bool isUnicode = (*_ppEditView)->getCurrentBuffer()->getUnicodeMode() != uni8Bit;
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT); HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH); HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH);
generic_string str2Search = getTextFromCombo(hFindCombo); generic_string str2Search = getTextFromCombo(hFindCombo, isUnicode);
generic_string str2Replace = getTextFromCombo(hReplaceCombo); generic_string str2Replace = getTextFromCombo(hReplaceCombo, isUnicode);
updateCombos(); updateCombos();
processReplace(str2Search.c_str(), str2Replace.c_str()); processReplace(str2Search.c_str(), str2Replace.c_str());
} }
@ -850,6 +916,7 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, FindOption *options)
int flags = Searching::buildSearchFlags(pOptions); int flags = Searching::buildSearchFlags(pOptions);
(*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); (*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags);
//::SendMessageA(_hParent, WM_SETTEXT, 0, (LPARAM)pText);
int posFind = (*_ppEditView)->searchInTarget(pText, startPosition, endPosition); int posFind = (*_ppEditView)->searchInTarget(pText, startPosition, endPosition);
if (posFind == -1) //no match found in target, check if a new target should be used if (posFind == -1) //no match found in target, check if a new target should be used
{ {
@ -1048,32 +1115,40 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
int stringSizeReplace = 0; int stringSizeReplace = 0;
TCHAR *pTextFind = NULL;//new TCHAR[stringSizeFind + 1]; TCHAR *pTextFind = NULL;//new TCHAR[stringSizeFind + 1];
if (!txt2find) { if (!txt2find)
{
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT); HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
generic_string str2Search = getTextFromCombo(hFindCombo, isUnicode); generic_string str2Search = getTextFromCombo(hFindCombo, isUnicode);
stringSizeFind = str2Search.length(); stringSizeFind = str2Search.length();
pTextFind = new TCHAR[stringSizeFind + 1]; pTextFind = new TCHAR[stringSizeFind + 1];
lstrcpy(pTextFind, str2Search.c_str()); lstrcpy(pTextFind, str2Search.c_str());
} else { }
else
{
stringSizeFind = lstrlen(txt2find); stringSizeFind = lstrlen(txt2find);
pTextFind = new TCHAR[stringSizeFind + 1]; pTextFind = new TCHAR[stringSizeFind + 1];
lstrcpy(pTextFind, txt2find); lstrcpy(pTextFind, txt2find);
} }
if (!pTextFind[0]) { if (!pTextFind[0])
{
delete [] pTextFind; delete [] pTextFind;
return nbProcessed; return nbProcessed;
} }
TCHAR *pTextReplace = NULL; TCHAR *pTextReplace = NULL;
if (op == ProcessReplaceAll) { if (op == ProcessReplaceAll)
if (!txt2replace) { {
if (!txt2replace)
{
HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH); HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH);
generic_string str2Replace = getTextFromCombo(hReplaceCombo, isUnicode); generic_string str2Replace = getTextFromCombo(hReplaceCombo, isUnicode);
stringSizeReplace = str2Replace.length(); stringSizeReplace = str2Replace.length();
pTextReplace = new TCHAR[stringSizeReplace + 1]; pTextReplace = new TCHAR[stringSizeReplace + 1];
lstrcpy(pTextReplace, str2Replace.c_str()); lstrcpy(pTextReplace, str2Replace.c_str());
} else { }
else
{
stringSizeReplace = lstrlen(txt2replace); stringSizeReplace = lstrlen(txt2replace);
pTextReplace = new TCHAR[stringSizeReplace + 1]; pTextReplace = new TCHAR[stringSizeReplace + 1];
lstrcpy(pTextReplace, txt2replace); lstrcpy(pTextReplace, txt2replace);
@ -1231,6 +1306,8 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
endRange += replaceDelta; //adjust end of range in case of replace endRange += replaceDelta; //adjust end of range in case of replace
nbProcessed++; nbProcessed++;
//::SendMessageA(_hParent, WM_SETTEXT, 0, (LPARAM)pTextFind);
targetStart = (*_ppEditView)->searchInTarget(pTextFind, startRange, endRange); targetStart = (*_ppEditView)->searchInTarget(pTextFind, startRange, endRange);
} }
delete [] pTextFind; delete [] pTextFind;

View File

@ -330,6 +330,7 @@ public :
_isFindingInFiles = false; _isFindingInFiles = false;
showFindInFilesButton(); showFindInFilesButton();
}; };
void saveFindHistory();
protected : protected :
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
@ -393,6 +394,9 @@ private :
HWND hCombo = ::GetDlgItem(_hSelf, comboID); HWND hCombo = ::GetDlgItem(_hSelf, comboID);
addText2Combo(getTextFromCombo(hCombo, isUnicode).c_str(), hCombo, isUnicode); addText2Combo(getTextFromCombo(hCombo, isUnicode).c_str(), hCombo, isUnicode);
}; };
void fillFindHistory();
void fillComboHistory(int id, int count, generic_string **pStrings);
void saveComboHistory(int id, int maxcount, int& oldcount, generic_string **pStrings);
}; };
//FindIncrementDlg: incremental search dialog, docked in rebar //FindIncrementDlg: incremental search dialog, docked in rebar

View File

@ -110,7 +110,7 @@
IntermediateDirectory="Release" IntermediateDirectory="Release"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops;.\no_ms_shit.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops;.\no_ms_shit.vsprops"
CharacterSet="1" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
<Tool <Tool