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
pull/10042/head
Ashfaaq18 4 years ago committed by Don Ho
parent 263910a9a9
commit c2534ee8f2

@ -534,6 +534,9 @@ LRESULT Notepad_plus::init(HWND hwnd)
_pluginsAdminDlg.setPluginsManager(&_pluginsManager); _pluginsAdminDlg.setPluginsManager(&_pluginsManager);
_pluginsManager.setMenu(_mainMenuHandle, NULL, enablePluginAdmin); _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 //Main menu is loaded, now load context menu items
nppParam.getContextMenuFromXmlTree(_mainMenuHandle, _pluginsManager.getMenuHandle()); nppParam.getContextMenuFromXmlTree(_mainMenuHandle, _pluginsManager.getMenuHandle());

@ -2584,6 +2584,9 @@ void FindReplaceDlg::findAllIn(InWhat op)
char ptrword[sizeof(void*)*2+1]; char ptrword[sizeof(void*)*2+1];
sprintf(ptrword, "%p", &_pFinder->_markingsStruct); sprintf(ptrword, "%p", &_pFinder->_markingsStruct);
_pFinder->_scintView.execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("@MarkingsStruct"), reinterpret_cast<LPARAM>(ptrword)); _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); ::SendMessage(_pFinder->getHSelf(), WM_SIZE, 0, 0);

Loading…
Cancel
Save