From 2b1e41512f9eec917ed0d01831b272dfcb1d5b33 Mon Sep 17 00:00:00 2001 From: donho Date: Wed, 27 Feb 2008 00:07:53 +0000 Subject: [PATCH] [RELEASE_4_8] Notepad++ v4.8 OR. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@138 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/bin/change.log | 46 ++++++++----- PowerEditor/installer/nppSetup.nsi | 35 +++++++--- PowerEditor/src/Notepad_plus.cpp | 80 ++++++++++++++--------- PowerEditor/src/Parameters.cpp | 7 +- PowerEditor/src/config.model.xml | 33 ++++++---- PowerEditor/src/shortcuts.xml | 22 ++++--- PowerEditor/visual.net/notepadPlus.vcproj | 12 ++-- 7 files changed, 148 insertions(+), 87 deletions(-) diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log index d83e7b822..922354bc6 100644 --- a/PowerEditor/bin/change.log +++ b/PowerEditor/bin/change.log @@ -1,22 +1,38 @@ -Notepad++ v4.7.5 fixed bugs and added features (from v4.7.3) : +Notepad++ v4.8 fixed bugs and added features (from v4.7.5) : + +1. Enhance Shortcut Mapper - all the commands (including plugins commands) can be assigned to a shortcut, even for the unmapped ones. +2. Upgrade Scintilla from v1.73 to v1.75 +3. Add multi-line and vertical capacity for tab bar. +4. Add launch "as notepad" style feature (detection of asNotepad.xml, then launch notepad++ with -multiInst -nosession -notabbar options). +5. Add detection mouse wheel on the different view feature : User can scroll edit view when mouse on it, it's not necessary to set edit view as current view to scroll it. +6. Add clicking middle mouse button click to set current view feature : make clicked edit view be focused, but the cursor position does not change. +7. Add mouse wheel horizontal scroll feature (vista only). +8. Add mouse browsing (forward/back for switching to next/previous document) feature. +9. Make orange indicator on the top of tab lighter when the view loss the focus. +10. Add new look and feel of Docking container. +11. Fix word-completion crash bug while the word to complete exceeds 256 characters. +12. Fix full screen mode bug : can not switch applications by using Alt+TAB in full screen mode. +13. Fix Preference crash bug. +14. Add the utf8->ansi / ansi->utf8 conversion feature. +15. Add Go to offset feature (in Go To Line dialog). +16. Fix folding bugs while deleting the begin/end folding keywords. +17. Fix position restored bug : Wrap position is restored correctly while switching back document. +18. Fix locking current directory behaviour : Restore Notepad++ directory as working directory with no open files. +19. Fix the multi-line tab height display problem while adding/removing the document. +20. Enhance the auto-completion feature : user can define the number of characters to trigger auto-completion popup window. +21. Change the horizontal scroll behaviour from dynamic one to static one. +22. Fix the bug that cannot save file(s) if application closed while minimized. -1. Fix invisible tabs bug while closing. -2. Fix the horizon scroll bar flicker bug. -3. Fix the full screen (F11) bug regarding multi-display issue -4. Explorer context menu is available under xp 64 bits et vista 64 bits. -5. Add YAML language. -6. Fix the crash issue of window dialog while clicking Sort button without selected item. -7. Enhance Sort feature GUI part - Enable Sort button only after clicking on the column tab; Disable Sort button after sorting. Included plugins : 1. TexFX v0.24a -2. NppExec v0.2 RC2 +2. NppExec v0.2 RC3.2 3. Spell Checker v1.3.1 -4. Quick text v0.02 -5. Explorer plugin v1.6.1 -6. Hex editor v0.84 -7. Base64 encoder/decoder v1.2 -8. FTP_synchronize v0.9.6 -9. NppExport v0.2.5.0 +4. Explorer plugin v1.7.1 +5. Hex editor v0.84 +6. Base64 encoder/decoder v1.2 +7. FTP_synchronize v0.9.6 +8. NppExport v0.2.7 +9. Compare plugin v1.5.1 diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index 050d5c042..ac4f3e679 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -17,16 +17,16 @@ ; Define the application name !define APPNAME "Notepad++" -!define APPNAMEANDVERSION "Notepad++ v4.7.5" +!define APPNAMEANDVERSION "Notepad++ v4.8" !define VERSION_MAJOR 4 -!define VERSION_MINOR 75 +!define VERSION_MINOR 8 ; Main Install settings Name "${APPNAMEANDVERSION}" InstallDir "$PROGRAMFILES\Notepad++" InstallDirRegKey HKLM "Software\${APPNAME}" "" -OutFile "..\bin\npp.4.7.5.Installer.exe" +OutFile "..\bin\npp.4.8.Installer.exe" @@ -601,9 +601,11 @@ SubSection "Plugins" Plugins SetOutPath "$INSTDIR\plugins\NPPTextFX" File "..\bin\plugins\NPPTextFX\AsciiToEBCDIC.bin" File "..\bin\plugins\NPPTextFX\libTidy.dll" - File "..\bin\plugins\NPPTextFX\NPPTextFXdemo.TXT" File "..\bin\plugins\NPPTextFX\W3C-CSSValidator.htm" File "..\bin\plugins\NPPTextFX\W3C-HTMLValidator.htm" + + SetOutPath "$INSTDIR\plugins\doc" + File "..\bin\plugins\doc\NPPTextFXdemo.TXT" SectionEnd /* Section "Function List" FunctionList @@ -654,7 +656,7 @@ SubSection "Plugins" Plugins File "..\bin\plugins\doc\NppExec.txt" File "..\bin\plugins\doc\NppExec_TechInfo.txt" SectionEnd - +/* Section "QuickText" QuickText Delete "$INSTDIR\plugins\QuickText.dll" SetOutPath "$INSTDIR\plugins" @@ -664,7 +666,7 @@ SubSection "Plugins" Plugins SetOutPath "$INSTDIR\plugins\doc" File "..\bin\plugins\doc\quickText_README.txt" SectionEnd - +*/ Section "NppTools" NppTools Delete "$INSTDIR\plugins\NppTools.dll" SetOutPath "$INSTDIR\plugins" @@ -675,6 +677,8 @@ SubSection "Plugins" Plugins Delete "$INSTDIR\plugins\FTP_synchronizeA.dll" SetOutPath "$INSTDIR\plugins" File "..\bin\plugins\FTP_synchronizeA.dll" + SetOutPath "$INSTDIR\plugins\doc" + File "..\bin\plugins\doc\FTP_synchonize.ReadMe.txt" SectionEnd Section "NppExport" NppExport @@ -683,6 +687,12 @@ SubSection "Plugins" Plugins File "..\bin\plugins\NppExport.dll" SectionEnd + Section "Compare Plugin" ComparePlugin + Delete "$INSTDIR\plugins\ComparePlugin.dll" + SetOutPath "$INSTDIR\plugins" + File "..\bin\plugins\ComparePlugin.dll" + SectionEnd + SubSectionEnd Section /o "As default html viewer" htmlViewer @@ -820,7 +830,7 @@ SubSection un.Plugins Delete "$APPDATA\Notepad++\NPPTextFX.ini" Delete "$INSTDIR\plugins\NPPTextFX\AsciiToEBCDIC.bin" Delete "$INSTDIR\plugins\NPPTextFX\libTidy.dll" - Delete "$INSTDIR\plugins\NPPTextFX\NPPTextFXdemo.TXT" + Delete "$INSTDIR\plugins\doc\NPPTextFXdemo.TXT" Delete "$INSTDIR\plugins\NPPTextFX\W3C-CSSValidator.htm" Delete "$INSTDIR\plugins\NPPTextFX\W3C-HTMLValidator.htm" @@ -871,14 +881,14 @@ SubSection un.Plugins RMDir "$INSTDIR\plugins\" RMDir "$INSTDIR\plugins\doc\" SectionEnd - +/* Section un.QuickText Delete "$INSTDIR\plugins\QuickText.dll" Delete "$INSTDIR\QuickText.ini" Delete "$INSTDIR\plugins\doc\quickText_README.txt" RMDir "$INSTDIR\plugins\" SectionEnd - +*/ Section un.NppTools Delete "$INSTDIR\plugins\NppTools.dll" RMDir "$INSTDIR\plugins\" @@ -886,6 +896,7 @@ SubSection un.Plugins Section un.FTP_synchronize Delete "$INSTDIR\plugins\FTP_synchronizeA.dll" + Delete "$INSTDIR\plugins\doc\FTP_synchonize.ReadMe.txt" RMDir "$INSTDIR\plugins\" SectionEnd @@ -893,6 +904,12 @@ SubSection un.Plugins Delete "$INSTDIR\plugins\NppExport.dll" RMDir "$INSTDIR\plugins\" SectionEnd + + Section un.ComparePlugin + Delete "$INSTDIR\plugins\ComparePlugin.dll" + RMDir "$INSTDIR\plugins\" + SectionEnd + SubSectionEnd Section un.htmlViewer diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 223013f73..1db233709 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -276,6 +276,9 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi setTitleWith(_pEditView->getCurrentTitle()); + if (nppGUI._tabStatus & TAB_MULTILINE) + ::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_DRAWTABBAR_MULTILINE, 0); + // Notify plugins that Notepad++ is ready SCNotification scnN; scnN.nmhdr.code = NPPN_READY; @@ -5989,7 +5992,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa TabBarPlus::setDrawTabCloseButton((tabBarStatus & TAB_CLOSEBUTTON) != 0); TabBarPlus::setDbClk2Close((tabBarStatus & TAB_DBCLK2CLOSE) != 0); TabBarPlus::setVertical((tabBarStatus & TAB_VERTICAL) != 0); - TabBarPlus::setMultiLine((tabBarStatus & TAB_MULTILINE) != 0); + //TabBarPlus::setMultiLine((tabBarStatus & TAB_MULTILINE) != 0); //--Splitter Section--// bool isVertical = (nppGUI._splitterPos == POS_VERTICAL); @@ -6053,28 +6056,6 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa //dynamicCheckMenuAndTB(); _mainEditView.defineDocType(L_TXT); - HMENU hMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FILE); - - int nbLRFile = pNppParam->getNbLRFile(); - - int pos = 16; - _lastRecentFileList.initMenu(hMenu, IDM_FILEMENU_LASTONE + 1, pos); - - for (int i = 0 ; i < nbLRFile ; i++) - { - string * stdStr = pNppParam->getLRFile(i); - if (nppGUI._checkHistoryFiles) - { - if (PathFileExists(stdStr->c_str())) - { - _lastRecentFileList.add(stdStr->c_str()); - } - } - else - { - _lastRecentFileList.add(stdStr->c_str()); - } - } if (nppGUI._isMinimizedToTray) _pTrayIco = new trayIconControler(_hSelf, IDI_M30ICON, IDC_MINIMIZED_TRAY, ::LoadIcon(_hInst, MAKEINTRESOURCE(IDI_M30ICON)), ""); @@ -6131,23 +6112,23 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa } //Languages Menu - hMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_LANGUAGE); + HMENU hLangMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_LANGUAGE); // Add external languages to menu for (int i = 0 ; i < pNppParam->getNbExternalLang() ; i++) { ExternalLangContainer & externalLangContainer = pNppParam->getELCFromIndex(i); - int numLangs = ::GetMenuItemCount(hMenu); + int numLangs = ::GetMenuItemCount(hLangMenu); char buffer[100]; int x; for(x = 0; (x == 0 || strcmp(externalLangContainer._name, buffer) > 0) && x < numLangs; x++) { - ::GetMenuString(hMenu, x, buffer, sizeof(buffer), MF_BYPOSITION); + ::GetMenuString(hLangMenu, x, buffer, sizeof(buffer), MF_BYPOSITION); } - ::InsertMenu(hMenu, x-1, MF_BYPOSITION, IDM_LANG_EXTERNAL + i, externalLangContainer._name); + ::InsertMenu(hLangMenu, x-1, MF_BYPOSITION, IDM_LANG_EXTERNAL + i, externalLangContainer._name); } if (nppGUI._excludedLangList.size() > 0) @@ -6156,21 +6137,21 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa { int cmdID = pNppParam->langTypeToCommandID(nppGUI._excludedLangList[i]._langType); char itemName[256]; - ::GetMenuString(hMenu, cmdID, itemName, sizeof(itemName), MF_BYCOMMAND); + ::GetMenuString(hLangMenu, cmdID, itemName, sizeof(itemName), MF_BYCOMMAND); nppGUI._excludedLangList[i]._cmdID = cmdID; nppGUI._excludedLangList[i]._langName = itemName; - ::DeleteMenu(hMenu, cmdID, MF_BYCOMMAND); + ::DeleteMenu(hLangMenu, cmdID, MF_BYCOMMAND); DrawMenuBar(_hSelf); } } // Add User Define Languages Entry - pos = ::GetMenuItemCount(hMenu) - 1; + int udlpos = ::GetMenuItemCount(hLangMenu) - 1; for (int i = 0 ; i < pNppParam->getNbUserLang() ; i++) { UserLangContainer & userLangContainer = pNppParam->getULCFromIndex(i); - ::InsertMenu(hMenu, pos + i, MF_BYPOSITION, IDM_LANG_USER + i + 1, userLangContainer.getName()); + ::InsertMenu(hLangMenu, udlpos + i, MF_BYPOSITION, IDM_LANG_USER + i + 1, userLangContainer.getName()); } //Plugin menu @@ -6179,6 +6160,28 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa //Windows menu _windowsMenu.init(_hInst, _mainMenuHandle, windowTrans.c_str()); + //Add recent files + HMENU hFileMenu = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FILE); + int nbLRFile = pNppParam->getNbLRFile(); + int pos = 16; + + _lastRecentFileList.initMenu(hFileMenu, IDM_FILEMENU_LASTONE + 1, pos); + for (int i = 0 ; i < nbLRFile ; i++) + { + string * stdStr = pNppParam->getLRFile(i); + if (nppGUI._checkHistoryFiles) + { + if (PathFileExists(stdStr->c_str())) + { + _lastRecentFileList.add(stdStr->c_str()); + } + } + else + { + _lastRecentFileList.add(stdStr->c_str()); + } + } + //The menu is loaded, add in all the accelerators // Update context menu strings @@ -6788,6 +6791,21 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa } return TRUE; } + + case WM_APPCOMMAND : + { + switch(GET_APPCOMMAND_LPARAM(lParam)) + { + case APPCOMMAND_BROWSER_BACKWARD : + case APPCOMMAND_BROWSER_FORWARD : + int nbDoc = _mainDocTab.isVisible()?_mainEditView.getNbDoc():0; + nbDoc += _subDocTab.isVisible()?_subEditView.getNbDoc():0; + if (nbDoc > 1) + activateNextDoc((GET_APPCOMMAND_LPARAM(lParam) == APPCOMMAND_BROWSER_FORWARD)?dirDown:dirUp); + _linkTriggered = true; + } + return TRUE; + } case NPPM_GETNBSESSIONFILES : { diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 608ad46f9..33ed74d14 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -56,8 +56,6 @@ WinMenuKeyDefinition winKeyDefs[] = { //array of accelerator keys for all std me {VK_NULL, IDM_FILE_SAVESESSION, false, false, false, NULL}, {VK_P, IDM_FILE_PRINT, true, false, false, NULL}, {VK_NULL, IDM_FILE_PRINTNOW, false, false, false, NULL}, - {VK_NULL, IDM_OPEN_ALL_RECENT_FILE, false, false, false, "Open All Recent Files"}, - {VK_NULL, IDM_CLEAN_RECENT_FILE_LIST, false, false, false, "Clean Recent Files List"}, {VK_F4, IDM_FILE_EXIT, false, true, false, NULL}, // {VK_NULL, IDM_EDIT_UNDO, false, false, false, NULL}, @@ -153,6 +151,11 @@ WinMenuKeyDefinition winKeyDefs[] = { //array of accelerator keys for all std me {VK_NULL, IDM_FORMAT_AS_UTF_8, false, false, false, NULL}, {VK_NULL, IDM_FORMAT_UCS_2BE, false, false, false, NULL}, {VK_NULL, IDM_FORMAT_UCS_2LE, false, false, false, NULL}, + {VK_NULL, IDM_FORMAT_CONV2_ANSI, false, false, false, NULL}, + {VK_NULL, IDM_FORMAT_CONV2_AS_UTF_8, false, false, false, NULL}, + {VK_NULL, IDM_FORMAT_CONV2_UTF_8, false, false, false, NULL}, + {VK_NULL, IDM_FORMAT_CONV2_UCS_2BE, false, false, false, NULL}, + {VK_NULL, IDM_FORMAT_CONV2_UCS_2LE, false, false, false, NULL}, {VK_NULL, IDM_SETTING_PREFERECE, false, false, false, NULL}, {VK_NULL, IDM_LANGSTYLE_CONFIG_DLG, false, false, false, NULL}, diff --git a/PowerEditor/src/config.model.xml b/PowerEditor/src/config.model.xml index 35111dbe2..091ce8a53 100644 --- a/PowerEditor/src/config.model.xml +++ b/PowerEditor/src/config.model.xml @@ -6,27 +6,27 @@ show - + vertical - hide + hide - + - + - + yes no no yes - - - - - + yes no - - - + no + yes + yes + 0 + + + - + diff --git a/PowerEditor/src/shortcuts.xml b/PowerEditor/src/shortcuts.xml index 38ea73e40..944a56474 100644 --- a/PowerEditor/src/shortcuts.xml +++ b/PowerEditor/src/shortcuts.xml @@ -1,14 +1,5 @@ - - firefox "$(FULL_CURRENT_PATH)" - iexplore "$(FULL_CURRENT_PATH)" - http://www.php.net/%20$(CURRENT_WORD) - http://www.google.com/search?q=$(CURRENT_WORD) - http://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD) - $(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) - $(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) -multiInst - @@ -18,6 +9,17 @@ - + + + firefox "$(FULL_CURRENT_PATH)" + iexplore "$(FULL_CURRENT_PATH)" + http://www.php.net/%20$(CURRENT_WORD) + http://www.google.com/search?q=$(CURRENT_WORD) + http://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD) + $(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) + $(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) -nosession -multiInst + + + diff --git a/PowerEditor/visual.net/notepadPlus.vcproj b/PowerEditor/visual.net/notepadPlus.vcproj index 5b9c02119..00b1cac4a 100644 --- a/PowerEditor/visual.net/notepadPlus.vcproj +++ b/PowerEditor/visual.net/notepadPlus.vcproj @@ -65,7 +65,7 @@ - - @@ -588,6 +584,10 @@ RelativePath="..\src\MISC\RegExt\resource.h" > + +