[BUG_FIXED] Fix no tool bar bug under w2k.

[BUG_FIXED] Fix "In selection" bug in Find Replace features.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@495 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2009-06-18 20:11:23 +00:00
parent 6dbed6e3c5
commit e7e4c9840e
3 changed files with 13 additions and 6 deletions

View File

@ -40,7 +40,7 @@
const TCHAR Notepad_plus::_className[32] = TEXT("Notepad++");
HWND Notepad_plus::gNppHWND = NULL;
const char *urlHttpRegExpr = "http://[a-z0-9_\\-\\+~.:?&@=/%#]*";
const char *urlHttpRegExpr = "http://[a-z0-9_\\-\\+.:?&@=/%#]*";
int docTabIconIDs[] = {IDI_SAVED_ICON, IDI_UNSAVED_ICON, IDI_READONLY_ICON};
enum tb_stat {tb_saved, tb_unsaved, tb_ro};
@ -2753,7 +2753,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
//Else forward notification to window of rebarband
REBARBANDINFO rbBand;
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
if (winVersion <= WV_ME)
if (winVersion <= WV_W2K)
{
ZeroMemory(&rbBand, sizeof(REBARBANDINFO));
rbBand.cbSize = sizeof(REBARBANDINFO);

View File

@ -675,6 +675,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
_isInSelection = true;
}
}
// Searching/replacing in column selection is not allowed
if ((*_ppEditView)->execute(SCI_GETSELECTIONMODE) == SC_SEL_RECTANGLE)
{
@ -683,6 +684,12 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
nbSelected = 0;
}
::EnableWindow(::GetDlgItem(_hSelf, IDC_IN_SELECTION_CHECK), nbSelected);
// uncheck if the control is disable
if (!nbSelected)
{
checkVal = BST_UNCHECKED;
_isInSelection = false;
}
::SendDlgItemMessage(_hSelf, IDC_IN_SELECTION_CHECK, BM_SETCHECK, checkVal, 0);
}
@ -2034,7 +2041,7 @@ void FindIncrementDlg::addToRebar(ReBar * rebar)
getClientRect(client);
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
if (winVersion <= WV_ME)
if (winVersion <= WV_W2K)
{
ZeroMemory(&_rbBand, sizeof(REBARBANDINFO));
_rbBand.cbSize = sizeof(REBARBANDINFO);

View File

@ -261,7 +261,7 @@ void ToolBar::addToRebar(ReBar * rebar) {
_pRebar = rebar;
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
if (winVersion <= WV_ME)
if (winVersion <= WV_W2K)
{
ZeroMemory(&_rbBand, sizeof(REBARBANDINFO));
_rbBand.cbSize = sizeof(REBARBANDINFO);
@ -347,7 +347,7 @@ void ReBar::setIDVisible(int id, bool show)
REBARBANDINFO rbBand;
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
if (winVersion <= WV_ME)
if (winVersion <= WV_W2K)
{
ZeroMemory(&rbBand, sizeof(REBARBANDINFO));
rbBand.cbSize = sizeof(REBARBANDINFO);
@ -374,7 +374,7 @@ bool ReBar::getIDVisible(int id)
return false; //error
REBARBANDINFO rbBand;
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
if (winVersion <= WV_ME)
if (winVersion <= WV_W2K)
{
ZeroMemory(&rbBand, sizeof(REBARBANDINFO));
rbBand.cbSize = sizeof(REBARBANDINFO);