[BUG_FIXED] Fix a regression bug: the notification message boxes were not modal.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@732 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
c180801062
commit
3bd739969d
@ -774,7 +774,7 @@ BEGIN
|
||||
LTEXT "Home Page :",IDC_STATIC,21,59,47,8
|
||||
LTEXT "http://notepad-plus-plus.org/",IDC_HOME_ADDR,78,59,126,8
|
||||
GROUPBOX "GNU General Public Licence",IDC_STATIC,19,75,231,131,BS_CENTER
|
||||
DEFPUSHBUTTON "Ok",IDOK,106,215,50,14,BS_FLAT,WS_EX_STATICEDGE
|
||||
DEFPUSHBUTTON "OK",IDOK,106,215,50,14,BS_FLAT,WS_EX_STATICEDGE
|
||||
// IDC_LICENCE_EDIT should be the last line, don't know why
|
||||
EDITTEXT IDC_LICENCE_EDIT,31,99,209,96,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
|
||||
END
|
||||
|
@ -863,7 +863,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
||||
msg += TEXT("\rfor file type : ");
|
||||
msg += _options._filters[0]?_options._filters:TEXT("*.*");
|
||||
|
||||
if (::MessageBox(_hMsgParent, msg.c_str(), TEXT("Are you sure?"), MB_OKCANCEL) == IDOK)
|
||||
if (::MessageBox(_hParent, msg.c_str(), TEXT("Are you sure?"), MB_OKCANCEL) == IDOK)
|
||||
{
|
||||
bool isUnicode = (*_ppEditView)->getCurrentBuffer()->getUnicodeMode() != uni8Bit;
|
||||
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
|
||||
@ -928,7 +928,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
||||
wsprintf(moreInfo, TEXT("%d occurrences were replaced."), nbReplaced);
|
||||
result = moreInfo;
|
||||
}
|
||||
::MessageBox(_hMsgParent, result.c_str(), TEXT("Replace All"), MB_OK);
|
||||
::MessageBox(_hParent, result.c_str(), TEXT("Replace All"), MB_OK);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -954,7 +954,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
||||
result = moreInfo;
|
||||
}
|
||||
if (isMacroRecording) saveInMacro(wParam, FR_OP_FIND);
|
||||
::MessageBox(_hMsgParent, result.c_str(), TEXT("Count"), MB_OK);
|
||||
::MessageBox(_hParent, result.c_str(), TEXT("Count"), MB_OK);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -981,7 +981,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
||||
wsprintf(moreInfo, TEXT("%d match(es) to occurrence(s)"), nbMarked);
|
||||
result = moreInfo;
|
||||
}
|
||||
::MessageBox(_hMsgParent, result.c_str(), TEXT("Mark"), MB_OK);
|
||||
::MessageBox(_hParent, result.c_str(), TEXT("Mark"), MB_OK);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -1267,7 +1267,7 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op
|
||||
generic_string msg = TEXT("Can't find the text:\r\n\"");
|
||||
msg += txt2find;
|
||||
msg += TEXT("\"");
|
||||
::MessageBox(_hMsgParent, msg.c_str(), TEXT("Find"), MB_OK);
|
||||
::MessageBox(_hParent, msg.c_str(), TEXT("Find"), MB_OK);
|
||||
// if the dialog is not shown, pass the focus to his parent(ie. Notepad++)
|
||||
if (!::IsWindowVisible(_hSelf))
|
||||
{
|
||||
@ -1909,7 +1909,6 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri
|
||||
{
|
||||
case IDC_FRCOMMAND_INIT:
|
||||
_env = new FindOption;
|
||||
_hMsgParent = _hParent;
|
||||
break;
|
||||
case IDFINDWHAT:
|
||||
_env->_str2Search = stringValue;
|
||||
@ -1982,7 +1981,7 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri
|
||||
msg += TEXT("\rfor file type : ");
|
||||
msg += (_env->_filters[0])?_env->_filters:TEXT("*.*");
|
||||
|
||||
if (::MessageBox(_hMsgParent, msg.c_str(), TEXT("Are you sure?"), MB_OKCANCEL) == IDOK)
|
||||
if (::MessageBox(_hParent, msg.c_str(), TEXT("Are you sure?"), MB_OKCANCEL) == IDOK)
|
||||
{
|
||||
nppParamInst->_isFindReplacing = true;
|
||||
::SendMessage(_hParent, WM_REPLACEINFILES, 0, 0);
|
||||
@ -2008,7 +2007,7 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri
|
||||
wsprintf(moreInfo, TEXT("%d occurrences were replaced."), nbReplaced);
|
||||
result = moreInfo;
|
||||
}
|
||||
::MessageBox(_hMsgParent, result.c_str(), TEXT("Replace All"), MB_OK);
|
||||
::MessageBox(_hParent, result.c_str(), TEXT("Replace All"), MB_OK);
|
||||
break;
|
||||
}
|
||||
case IDCCOUNTALL :
|
||||
@ -2024,7 +2023,7 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri
|
||||
wsprintf(moreInfo, TEXT("%d match(es) to occurrence(s)"), nbCounted);
|
||||
result = moreInfo;
|
||||
}
|
||||
::MessageBox(_hMsgParent, result.c_str(), TEXT("Count"), MB_OK);
|
||||
::MessageBox(_hParent, result.c_str(), TEXT("Count"), MB_OK);
|
||||
break;
|
||||
}
|
||||
case IDCMARKALL:
|
||||
@ -2041,13 +2040,12 @@ void FindReplaceDlg::execSavedCommand(int cmd, int intValue, generic_string stri
|
||||
wsprintf(moreInfo, TEXT("%d match(es) to occurrence(s)"), nbMarked);
|
||||
result = moreInfo;
|
||||
}
|
||||
::MessageBox(_hMsgParent, result.c_str(), TEXT("Mark"), MB_OK);
|
||||
::MessageBox(_hParent, result.c_str(), TEXT("Mark"), MB_OK);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw std::runtime_error("Internal error: unknown saved command!");
|
||||
}
|
||||
_hMsgParent = _hSelf;
|
||||
delete _env;
|
||||
_env = &_options;
|
||||
break;
|
||||
|
@ -186,7 +186,6 @@ public :
|
||||
if (!ppEditView)
|
||||
throw std::runtime_error("FindIncrementDlg::init : ppEditView is null.");
|
||||
_ppEditView = ppEditView;
|
||||
_hMsgParent = _hSelf;
|
||||
};
|
||||
|
||||
virtual void create(int dialogID, bool isRTL = false);
|
||||
@ -335,7 +334,6 @@ private :
|
||||
static const int FR_OP_FIF = 4;
|
||||
static const int FR_OP_GLOBAL = 8;
|
||||
void saveInMacro(int cmd, int cmdType);
|
||||
HWND _hMsgParent;
|
||||
};
|
||||
|
||||
//FindIncrementDlg: incremental search dialog, docked in rebar
|
||||
|
Loading…
Reference in New Issue
Block a user