[ENHANCEMENT] (Author: Mike Cowperthwaite) Enhance Incremental search. (part 1/2)
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1334 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
435b1001b9
commit
b7edd3c8e2
@ -708,7 +708,8 @@ LRESULT Notepad_plus::init(HWND hwnd)
|
|||||||
loadBufferIntoView(_subEditView.getCurrentBufferID(), SUB_VIEW);
|
loadBufferIntoView(_subEditView.getCurrentBufferID(), SUB_VIEW);
|
||||||
activateBuffer(_mainEditView.getCurrentBufferID(), MAIN_VIEW);
|
activateBuffer(_mainEditView.getCurrentBufferID(), MAIN_VIEW);
|
||||||
activateBuffer(_subEditView.getCurrentBufferID(), SUB_VIEW);
|
activateBuffer(_subEditView.getCurrentBufferID(), SUB_VIEW);
|
||||||
::SetFocus(_mainEditView.getHSelf());
|
//::SetFocus(_mainEditView.getHSelf());
|
||||||
|
_mainEditView.getFocus();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,6 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin
|
|||||||
char dest[MAX_PATH];
|
char dest[MAX_PATH];
|
||||||
wcstombs(dest, (cmdLineParams->_easterEggName).c_str(), sizeof(dest));
|
wcstombs(dest, (cmdLineParams->_easterEggName).c_str(), sizeof(dest));
|
||||||
|
|
||||||
|
|
||||||
//::MessageBoxA(NULL, destStr.c_str(), "", MB_OK);
|
//::MessageBoxA(NULL, destStr.c_str(), "", MB_OK);
|
||||||
if (cmdLineParams->_quoteType == 0) // Easter Egg Name
|
if (cmdLineParams->_quoteType == 0) // Easter Egg Name
|
||||||
{
|
{
|
||||||
|
@ -890,7 +890,8 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
result = moreInfo;
|
result = moreInfo;
|
||||||
}
|
}
|
||||||
setStatusbarMessage(result, FSMessage);
|
setStatusbarMessage(result, FSMessage);
|
||||||
::SetFocus(_hSelf);
|
//::SetFocus(_hSelf);
|
||||||
|
getFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -921,7 +922,8 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
}
|
}
|
||||||
if (isMacroRecording) saveInMacro(wParam, FR_OP_FIND);
|
if (isMacroRecording) saveInMacro(wParam, FR_OP_FIND);
|
||||||
setStatusbarMessage(result, FSMessage);
|
setStatusbarMessage(result, FSMessage);
|
||||||
::SetFocus(_hSelf);
|
//::SetFocus(_hSelf);
|
||||||
|
getFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -953,7 +955,8 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
result = moreInfo;
|
result = moreInfo;
|
||||||
}
|
}
|
||||||
setStatusbarMessage(result, FSMessage);
|
setStatusbarMessage(result, FSMessage);
|
||||||
::SetFocus(_hSelf);
|
//::SetFocus(_hSelf);
|
||||||
|
getFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1279,7 +1282,8 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op
|
|||||||
// if the dialog is not shown, pass the focus to his parent(ie. Notepad++)
|
// if the dialog is not shown, pass the focus to his parent(ie. Notepad++)
|
||||||
if (!::IsWindowVisible(_hSelf))
|
if (!::IsWindowVisible(_hSelf))
|
||||||
{
|
{
|
||||||
::SetFocus((*_ppEditView)->getHSelf());
|
//::SetFocus((*_ppEditView)->getHSelf());
|
||||||
|
(*_ppEditView)->getFocus();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2720,8 +2724,9 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
|
|||||||
{
|
{
|
||||||
case IDCANCEL :
|
case IDCANCEL :
|
||||||
(*(_pFRDlg->_ppEditView))->clearIndicator(SCE_UNIVERSAL_FOUND_STYLE_INC);
|
(*(_pFRDlg->_ppEditView))->clearIndicator(SCE_UNIVERSAL_FOUND_STYLE_INC);
|
||||||
::SetFocus((*(_pFRDlg->_ppEditView))->getHSelf());
|
//::SetFocus((*(_pFRDlg->_ppEditView))->getHSelf());
|
||||||
|
(*(_pFRDlg->_ppEditView))->getFocus();
|
||||||
|
::SendDlgItemMessage(_hSelf, IDC_INCFINDHILITEALL, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||||
display(false);
|
display(false);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -2819,13 +2824,6 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
|
|||||||
return (BOOL)lResult;
|
return (BOOL)lResult;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_MOVE:
|
|
||||||
{
|
|
||||||
::InvalidateRect(_hSelf, NULL, TRUE); //when moving, force background redraw
|
|
||||||
return FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -2884,7 +2882,7 @@ void FindIncrementDlg::addToRebar(ReBar * rebar)
|
|||||||
_rbBand.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE |
|
_rbBand.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE |
|
||||||
RBBIM_SIZE | RBBIM_ID;
|
RBBIM_SIZE | RBBIM_ID;
|
||||||
|
|
||||||
_rbBand.fStyle = RBBS_HIDDEN;
|
_rbBand.fStyle = RBBS_HIDDEN | RBBS_NOGRIPPER;
|
||||||
_rbBand.hwndChild = getHSelf();
|
_rbBand.hwndChild = getHSelf();
|
||||||
_rbBand.wID = REBAR_BAR_SEARCH; //ID REBAR_BAR_SEARCH for search dialog
|
_rbBand.wID = REBAR_BAR_SEARCH; //ID REBAR_BAR_SEARCH for search dialog
|
||||||
_rbBand.cxMinChild = 0;
|
_rbBand.cxMinChild = 0;
|
||||||
|
@ -96,11 +96,11 @@ FONT 8, TEXT("MS Shell Dlg")
|
|||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "X",IDCANCEL,2,3,16,14
|
PUSHBUTTON "X",IDCANCEL,2,3,16,14
|
||||||
RTEXT "Find :",IDC_INCSTATIC,20,6,25,12
|
RTEXT "Find :",IDC_INCSTATIC,20,6,25,12
|
||||||
EDITTEXT IDC_INCFINDTEXT,45,6,175,10,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER | WS_TABSTOP ,WS_EX_STATICEDGE
|
EDITTEXT IDC_INCFINDTEXT,45,6,175,10,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER | WS_TABSTOP, WS_EX_STATICEDGE
|
||||||
PUSHBUTTON "<",IDC_INCFINDPREVOK | WS_TABSTOP,223,3,16,14
|
PUSHBUTTON "<",IDC_INCFINDPREVOK | WS_TABSTOP,223,3,16,14
|
||||||
PUSHBUTTON ">",IDC_INCFINDNXTOK | WS_TABSTOP,243,3,16,14
|
PUSHBUTTON ">",IDC_INCFINDNXTOK | WS_TABSTOP,243,3,16,14
|
||||||
CONTROL "Highlight all", IDC_INCFINDHILITEALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,5,65,12
|
CONTROL "&Highlight all", IDC_INCFINDHILITEALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,5,65,12
|
||||||
CONTROL "Match case", IDC_INCFINDMATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,5,60,12
|
CONTROL "Match &case", IDC_INCFINDMATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,335,5,60,12
|
||||||
LTEXT "",IDC_INCFINDSTATUS,400,6,180,12
|
LTEXT "",IDC_INCFINDSTATUS,400,6,180,12
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -428,7 +428,10 @@ void ReBar::init(HINSTANCE hInst, HWND hPere)
|
|||||||
bool ReBar::addBand(REBARBANDINFO * rBand, bool useID)
|
bool ReBar::addBand(REBARBANDINFO * rBand, bool useID)
|
||||||
{
|
{
|
||||||
if (rBand->fMask & RBBIM_STYLE)
|
if (rBand->fMask & RBBIM_STYLE)
|
||||||
rBand->fStyle |= RBBS_GRIPPERALWAYS;
|
{
|
||||||
|
if (!(rBand->fStyle & RBBS_NOGRIPPER))
|
||||||
|
rBand->fStyle |= RBBS_GRIPPERALWAYS;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
rBand->fStyle = RBBS_GRIPPERALWAYS;
|
rBand->fStyle = RBBS_GRIPPERALWAYS;
|
||||||
rBand->fMask |= RBBIM_ID | RBBIM_STYLE;
|
rBand->fMask |= RBBIM_ID | RBBIM_STYLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user