[BUG_FIXED] Prevent Notepad++ save files to "vitual store" under vista.

Remove unnecessary timer for find in files feature.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@359 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-11-30 23:23:04 +00:00
parent 534ebfabea
commit 4e51f83fea
5 changed files with 34 additions and 17 deletions

View File

@ -1562,16 +1562,16 @@ bool Notepad_plus::findInFiles()
vector<generic_string> fileNames;
_findReplaceDlg.putFindResultStr(TEXT("Scanning files to search..."));
_findReplaceDlg.refresh();
//_findReplaceDlg.refresh();
getMatchedFileNames(dir2Search, patterns2Match, fileNames, isRecursive, isInHiddenDir);
TCHAR msg[128];
wsprintf(msg, TEXT("Found %d matching files"), fileNames.size());
_findReplaceDlg.putFindResultStr((const TCHAR*)msg);
_findReplaceDlg.refresh();
//_findReplaceDlg.refresh();
UINT_PTR pTimer = ::SetTimer(_hSelf, 12614, 500, NULL);
//UINT_PTR pTimer = ::SetTimer(_hSelf, 12614, 500, NULL);
bool dontClose = false;
for (size_t i = 0 ; i < fileNames.size() ; i++)
@ -1610,11 +1610,11 @@ bool Notepad_plus::findInFiles()
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, oldDoc);
_pEditView = pOldView;
::KillTimer(_hSelf, pTimer);
//::KillTimer(_hSelf, pTimer);
wsprintf(msg, TEXT("%d hits"), nbTotal);
_findReplaceDlg.putFindResultStr((const TCHAR *)&msg);
_findReplaceDlg.refresh();
//_findReplaceDlg.refresh();
_findReplaceDlg.reachEnd();
return true;
}
@ -7990,12 +7990,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
_dockingManager.showDockableDlg((HWND)lParam, SW_SHOW);
return TRUE;
}
/*
case WM_TIMER:
{
_findReplaceDlg.refresh();
}
*/
case NPPM_DMMHIDE:
{
_dockingManager.showDockableDlg((HWND)lParam, SW_HIDE);

View File

@ -382,7 +382,8 @@ void FileManager::closeBuffer(BufferID id, ScintillaEditView * identifier) {
BufferID FileManager::loadFile(const TCHAR * filename, Document doc) {
bool ownDoc = false;
if (doc == NULL) {
if (doc == NULL)
{
doc = (Document)_pscratchTilla->execute(SCI_CREATEDOCUMENT);
ownDoc = true;
}
@ -392,7 +393,8 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc) {
::GetLongPathName(fullpath, fullpath, MAX_PATH);
Utf8_16_Read UnicodeConvertor; //declare here so we can get information after loading is done
bool res = loadFileData(doc, fullpath, &UnicodeConvertor, L_TXT);
if (res) {
if (res)
{
Buffer * newBuf = new Buffer(this, _nextBufferID, doc, DOC_REGULAR, fullpath);
BufferID id = (BufferID) newBuf;
newBuf->_id = id;
@ -401,9 +403,12 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc) {
Buffer * buf = _buffers.at(_nrBufs - 1);
// 3 formats : WIN_FORMAT, UNIX_FORMAT and MAC_FORMAT
if (UnicodeConvertor.getNewBuf()) {
if (UnicodeConvertor.getNewBuf())
{
buf->determinateFormat(UnicodeConvertor.getNewBuf());
} else {
}
else
{
buf->determinateFormat("");
}
buf->setUnicodeMode(UnicodeConvertor.getEncoding());

View File

@ -1384,19 +1384,22 @@ void FindReplaceDlg::findAllIn(InWhat op)
::SendMessage(_hParent, (op==ALL_OPEN_DOCS)?WM_FINDALL_INOPENEDDOC:WM_FINDINFILES, 0, 0);
refresh();
//refresh();
}
void FindReplaceDlg::putFindResultStr(const TCHAR *text)
{
wsprintf(_findAllResultStr, TEXT("%s"), text);
}
void FindReplaceDlg::refresh()
{
::SendMessage(_hParent, NPPM_DMMSHOW, 0, (LPARAM)_pFinder->getHSelf());
}
/*
void FindReplaceDlg::refresh()
{
//::SendMessage(_hParent, NPPM_DMMSHOW, 0, (LPARAM)_pFinder->getHSelf());
}
*/
void FindReplaceDlg::enableReplaceFunc(bool isEnable)
{
_currentStatus = isEnable?REPLACE_DLG:FIND_DLG;

View File

@ -20,4 +20,13 @@
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -21,7 +21,7 @@
IntermediateDirectory="Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops;.\no_ms_shit.vsprops"
CharacterSet="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"