From a630b63c9a557a640a522ed22b2f7f1b18a0379a Mon Sep 17 00:00:00 2001 From: ozone10 Date: Sun, 13 Jun 2021 17:47:25 +0200 Subject: [PATCH] Add encoding context menu via right/double click on encoding display zone of status bar Fix #9998, fix #400, fix #756, close #11678 --- PowerEditor/src/NppNotification.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index b2927707f..934b78a0e 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -448,6 +448,13 @@ BOOL Notepad_plus::notify(SCNotification *notification) return TRUE; 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; } @@ -484,6 +491,13 @@ BOOL Notepad_plus::notify(SCNotification *notification) return TRUE; 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; } else if (_pDocumentListPanel && notification->nmhdr.hwndFrom == _pDocumentListPanel->getHSelf())