Make the Search Results Window locked (grayed) until the first search

The search result window option will only enable after the first Find All search

Fix #9655, close #9967
This commit is contained in:
Ashfaaq18 2021-06-08 09:46:03 +05:30 committed by Don Ho
parent 263910a9a9
commit c2534ee8f2
2 changed files with 6 additions and 0 deletions

View File

@ -534,6 +534,9 @@ LRESULT Notepad_plus::init(HWND hwnd)
_pluginsAdminDlg.setPluginsManager(&_pluginsManager);
_pluginsManager.setMenu(_mainMenuHandle, NULL, enablePluginAdmin);
//Search menu
//disable "Search Results Window" under Search Menu
::EnableMenuItem(_mainMenuHandle, IDM_FOCUS_ON_FOUND_RESULTS, MF_DISABLED | MF_GRAYED | MF_BYCOMMAND);
//Main menu is loaded, now load context menu items
nppParam.getContextMenuFromXmlTree(_mainMenuHandle, _pluginsManager.getMenuHandle());

View File

@ -2584,6 +2584,9 @@ void FindReplaceDlg::findAllIn(InWhat op)
char ptrword[sizeof(void*)*2+1];
sprintf(ptrword, "%p", &_pFinder->_markingsStruct);
_pFinder->_scintView.execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("@MarkingsStruct"), reinterpret_cast<LPARAM>(ptrword));
//enable "Search Results Window" under Search Menu
::EnableMenuItem(::GetMenu(_hParent), IDM_FOCUS_ON_FOUND_RESULTS, MF_ENABLED | MF_BYCOMMAND);
}
::SendMessage(_pFinder->getHSelf(), WM_SIZE, 0, 0);