From a7c2d050fda97de7d87467a515ea68a74f1cb226 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 8 Dec 2013 13:52:49 +0000 Subject: [PATCH] [BUG_FIXED] Fix the display/translation problem for new added commands. [UPDATE] Update html auto-completion file. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1157 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/installer/APIs/html.xml | 699 ++++++++++++++++++++-------- PowerEditor/src/Notepad_plus.cpp | 4 +- PowerEditor/src/Notepad_plus.rc | 6 +- PowerEditor/src/NppNotification.cpp | 4 +- PowerEditor/src/localization.cpp | 29 +- PowerEditor/src/menuCmdID.h | 32 +- 6 files changed, 560 insertions(+), 214 deletions(-) diff --git a/PowerEditor/installer/APIs/html.xml b/PowerEditor/installer/APIs/html.xml index e7314d1c..8bcb904c 100644 --- a/PowerEditor/installer/APIs/html.xml +++ b/PowerEditor/installer/APIs/html.xml @@ -1,51 +1,212 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -54,207 +215,143 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - + @@ -263,35 +360,253 @@ + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 2f12bd3a..c408fa84 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -509,9 +509,9 @@ LRESULT Notepad_plus::init(HWND hwnd) //Add recent files HMENU hFileMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FILE); int nbLRFile = pNppParam->getNbLRFile(); - int pos = IDM_FILEMENU_LASTONE - IDM_FILE + 1 /* +1 : because of IDM_FILE_PRINTNOW */; + //int pos = IDM_FILEMENU_LASTONE - IDM_FILE + 1 /* +1 : because of IDM_FILE_PRINTNOW */; - _lastRecentFileList.initMenu(hFileMenu, IDM_FILEMENU_LASTONE + 1, pos, pNppParam->putRecentFileInSubMenu()); + _lastRecentFileList.initMenu(hFileMenu, IDM_FILEMENU_LASTONE + 1, IDM_FILEMENU_EXISTCMDPOSITION, pNppParam->putRecentFileInSubMenu()); _lastRecentFileList.setLangEncoding(_nativeLangSpeaker.getLangEncoding()); for (int i = 0 ; i < nbLRFile ; ++i) { diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 50c1e802..f4076b73 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -210,10 +210,10 @@ BEGIN BEGIN MENUITEM "&New", IDM_FILE_NEW MENUITEM "&Open...", IDM_FILE_OPEN - POPUP "Open Folder" + POPUP "Open Containing Folder" BEGIN - MENUITEM "Open Containing Folder", IDM_FILE_OPEN_FOLDER - MENUITEM "Open cmd", IDM_FILE_OPEN_CMD + MENUITEM "Explorer", IDM_FILE_OPEN_FOLDER + MENUITEM "cmd", IDM_FILE_OPEN_CMD END MENUITEM "Re&load from Disk", IDM_FILE_RELOAD MENUITEM "&Save", IDM_FILE_SAVE diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index e0a2804d..5a147533 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -341,8 +341,8 @@ BOOL Notepad_plus::notify(SCNotification *notification) itemUnitArray.push_back(MenuItemUnit(IDM_FILE_RELOAD, TEXT("Reload"))); itemUnitArray.push_back(MenuItemUnit(IDM_FILE_PRINT, TEXT("Print"))); itemUnitArray.push_back(MenuItemUnit(0, NULL)); - itemUnitArray.push_back(MenuItemUnit(IDM_FILE_OPEN_FOLDER, TEXT("Open Containing Folder"))); - itemUnitArray.push_back(MenuItemUnit(IDM_FILE_OPEN_CMD, TEXT("Open cmd"))); + itemUnitArray.push_back(MenuItemUnit(IDM_FILE_OPEN_FOLDER, TEXT("Open Containing Folder in Explorer"))); + itemUnitArray.push_back(MenuItemUnit(IDM_FILE_OPEN_CMD, TEXT("Open Containing Folder in cmd"))); itemUnitArray.push_back(MenuItemUnit(0, NULL)); itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_SETREADONLY, TEXT("Read-Only"))); itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_CLEARREADONLY, TEXT("Clear Read-Only Flag"))); diff --git a/PowerEditor/src/localization.cpp b/PowerEditor/src/localization.cpp index a1031b25..4722fd4b 100644 --- a/PowerEditor/src/localization.cpp +++ b/PowerEditor/src/localization.cpp @@ -160,7 +160,8 @@ MenuPosition menuPos[] = { { 7, -1, -1, "macro"}, { 8, -1, -1, "run"}, - { 0, 10, -1, "file-closeMore"}, + { 0, 2, -1, "file-openFolder"}, + { 0, 11, -1, "file-closeMore"}, { 0, 19, -1, "file-recentFiles"}, { 1, 10, -1, "edit-copyToClipboard"}, @@ -336,20 +337,22 @@ int tabContextMenuItemPos[] = { 4, // 2 : Save 5, // 3 : Save As 9, // 4 : Print -18,// 5 : Move to Other View -19,// 6 : Clone to Other View -14,// 7 : Full File Path to Clipboard -15,// 8 : Filename to Clipboard -16,// 9 : Current Dir. Path to Clipboard +21,// 5 : Move to Other View +22,// 6 : Clone to Other View +17,// 7 : Full File Path to Clipboard +18,// 8 : Filename to Clipboard +19,// 9 : Current Dir. Path to Clipboard 6, // 10: Rename -7, // 11: Delete -11, // 12: Read-Only -12,// 13: Clear Read-Only Flag -20,// 14: Move to New Instance -21,// 15: Open to New Instance +7, // 11: Move to Recycle Bin +14,// 12: Read-Only +15,// 13: Clear Read-Only Flag +23,// 14: Move to New Instance +24,// 15: Open to New Instance 8, // 16: Reload -2, // 17 : Close ALL to the Left -3, // 18 : Close ALL to the Right +2, // 17: Close ALL to the Left +3, // 18: Close ALL to the Right +11,// 19: Open Containing Folder in Explorer +12,// 20: Open Containing Folder in cmd -1 //-------End }; diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index e5016126..269b2627 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -32,6 +32,7 @@ #define IDM 40000 #define IDM_FILE (IDM + 1000) +// IMPORTANT: If list below is modified, you have to change the value of IDM_FILEMENU_LASTONE and IDM_FILEMENU_EXISTCMDPOSITION #define IDM_FILE_NEW (IDM_FILE + 1) #define IDM_FILE_OPEN (IDM_FILE + 2) #define IDM_FILE_CLOSE (IDM_FILE + 3) @@ -53,9 +54,36 @@ #define IDM_FILE_CLOSEALL_TORIGHT (IDM_FILE + 18) #define IDM_FILE_OPEN_FOLDER (IDM_FILE + 19) #define IDM_FILE_OPEN_CMD (IDM_FILE + 20) +// IMPORTANT: If list above is modified, you have to change the following values: - // To be updated if new menu item(s) is (are) added in menu "File" - #define IDM_FILEMENU_LASTONE IDM_FILE_CLOSEALL_TORIGHT +// To be updated if new menu item(s) is (are) added in menu "File" + #define IDM_FILEMENU_LASTONE IDM_FILE_OPEN_CMD + +// 0 based position of command "Exit" including the bars in the file menu +// and without counting "Recent files history" items + +// 0 New +// 1 Open... +// 2 Open Folder +// 3 Reload from Disk +// 4 Save +// 5 Save As... +// 6 Save a Copy As... +// 7 Save All +// 8 Rename... +// 9 Close +//10 Close All +//11 Close More +//12 Move to Recycle Bin +//13 -------- +//14 Load Session... +//15 Save Session... +//16 -------- +//17 Print... +//18 Print Now +//19 -------- +//20 Exit + #define IDM_FILEMENU_EXISTCMDPOSITION 20 #define IDM_EDIT (IDM + 2000) #define IDM_EDIT_CUT (IDM_EDIT + 1)