Add encoding context menu via right/double click on encoding display zone of status bar

Fix #9998, fix #400, fix #756, close #11678
pull/11643/merge
ozone10 2021-06-13 17:47:25 +02:00 committed by Don Ho
parent 0f8d5724af
commit a630b63c9a
1 changed files with 14 additions and 0 deletions

View File

@ -448,6 +448,13 @@ BOOL Notepad_plus::notify(SCNotification *notification)
return TRUE; return TRUE;
TrackPopupMenu(hEolFormatMenu, 0, p.x, p.y, 0, _pPublicInterface->getHSelf(), NULL); TrackPopupMenu(hEolFormatMenu, 0, p.x, p.y, 0, _pPublicInterface->getHSelf(), NULL);
} }
else if (lpnm->dwItemSpec == DWORD(STATUSBAR_UNICODE_TYPE))
{
POINT p;
::GetCursorPos(&p);
HMENU hLangMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FORMAT);
TrackPopupMenu(hLangMenu, 0, p.x, p.y, 0, _pPublicInterface->getHSelf(), NULL);
}
} }
break; break;
} }
@ -484,6 +491,13 @@ BOOL Notepad_plus::notify(SCNotification *notification)
return TRUE; return TRUE;
TrackPopupMenu(hEolFormatMenu, 0, p.x, p.y, 0, _pPublicInterface->getHSelf(), NULL); TrackPopupMenu(hEolFormatMenu, 0, p.x, p.y, 0, _pPublicInterface->getHSelf(), NULL);
} }
else if (lpnm->dwItemSpec == DWORD(STATUSBAR_UNICODE_TYPE))
{
POINT p;
::GetCursorPos(&p);
HMENU hLangMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FORMAT);
TrackPopupMenu(hLangMenu, 0, p.x, p.y, 0, _pPublicInterface->getHSelf(), NULL);
}
return TRUE; return TRUE;
} }
else if (_pDocumentListPanel && notification->nmhdr.hwndFrom == _pDocumentListPanel->getHSelf()) else if (_pDocumentListPanel && notification->nmhdr.hwndFrom == _pDocumentListPanel->getHSelf())