Browse Source

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
commit
c2534ee8f2
  1. 3
      PowerEditor/src/Notepad_plus.cpp
  2. 3
      PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp

3
PowerEditor/src/Notepad_plus.cpp

@ -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());

3
PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp

@ -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);

Loading…
Cancel
Save