Remove not used codes

pull/11265/head
Don Ho 3 years ago
parent ee765135be
commit 58e404650b

@ -482,7 +482,7 @@ HMENU PluginsManager::initMenu(HMENU hMenu, bool enablePluginAdmin)
if (!_hPluginsMenu)
{
_hPluginsMenu = ::GetSubMenu(hMenu, 10);
_hPluginsMenu = ::GetSubMenu(hMenu, MENUINDEX_PLUGINS);
int i = 1;

@ -458,9 +458,7 @@ LRESULT Notepad_plus::init(HWND hwnd)
{
::DeleteMenu(_mainMenuHandle, IDM_UPDATE_NPP, MF_BYCOMMAND);
::DeleteMenu(_mainMenuHandle, IDM_CONFUPDATERPROXY, MF_BYCOMMAND);
HMENU hHelpMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_PLUGINS + 1);
if (!hHelpMenu)
hHelpMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_PLUGINS);
HMENU hHelpMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_HELP);
if (hHelpMenu)
::DeleteMenu(hHelpMenu, 7, MF_BYPOSITION); // SEPARATOR
::DrawMenuBar(hwnd);
@ -6432,23 +6430,9 @@ bool Notepad_plus::reloadLang()
nppParam.reloadContextMenuFromXmlTree(_mainMenuHandle, _pluginsManager.getMenuHandle());
generic_string pluginsTrans, windowTrans;
_nativeLangSpeaker.changeMenuLang(_mainMenuHandle);
::DrawMenuBar(_pPublicInterface->getHSelf());
int indexWindow = ::GetMenuItemCount(_mainMenuHandle) - 3;
if (pluginsTrans != TEXT(""))
{
::ModifyMenu(_mainMenuHandle, indexWindow - 1, MF_BYPOSITION, 0, pluginsTrans.c_str());
}
if (windowTrans != TEXT(""))
{
::ModifyMenu(_mainMenuHandle, indexWindow, MF_BYPOSITION, 0, windowTrans.c_str());
windowTrans += TEXT("...");
::ModifyMenu(_mainMenuHandle, IDM_WINDOW_WINDOWS, MF_BYCOMMAND, IDM_WINDOW_WINDOWS, windowTrans.c_str());
}
// Update scintilla context menu strings
vector<MenuItemUnit> & tmp = nppParam.getContextMenuItems();
size_t len = tmp.size();

@ -1151,7 +1151,7 @@ LRESULT CALLBACK WindowsDlg::listViewProc(HWND hwnd, UINT Message, WPARAM wParam
void WindowsMenu::init(HMENU hMainMenu)
{
_hMenu = ::GetSubMenu(hMainMenu, 11);
_hMenu = ::GetSubMenu(hMainMenu, MENUINDEX_WINDOW);
}
void WindowsMenu::initPopupMenu(HMENU hMenu, DocTabView *pTab)

@ -691,3 +691,5 @@
#define MENUINDEX_MACRO 8
#define MENUINDEX_RUN 9
#define MENUINDEX_PLUGINS 10
#define MENUINDEX_WINDOW 11
#define MENUINDEX_HELP 12

Loading…
Cancel
Save