diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log index d2ab0e12..49cc6848 100644 --- a/PowerEditor/bin/change.log +++ b/PowerEditor/bin/change.log @@ -1,3 +1,10 @@ +Notepad++ v5.4.2 fixed bugs (from v5.4.1) : + +1. Fix the localization switcher bug while w/o doLocalConf.xml. +2. Fix only one document "Move to other view" close Notepad++ instance issue. +3. Fix plugin menu boolean check box bug. + + Notepad++ v5.4.1 new features and fixed bugs (from v5.4) : 1. Add ChangeMarkers plugin in installer. diff --git a/PowerEditor/bin/npp.pdb b/PowerEditor/bin/npp.pdb index ef8ec41f..0fb25c16 100644 Binary files a/PowerEditor/bin/npp.pdb and b/PowerEditor/bin/npp.pdb differ diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index 7902663e..0b54e7c7 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -17,18 +17,18 @@ ; Define the application name !define APPNAME "Notepad++" -!define APPVERSION "5.4.1" -!define APPNAMEANDVERSION "Notepad++ v5.4.1" +!define APPVERSION "5.4.2" +!define APPNAMEANDVERSION "Notepad++ v5.4.2" !define APPWEBSITE "http://notepad-plus.sourceforge.net/" !define VERSION_MAJOR 5 -!define VERSION_MINOR 41 +!define VERSION_MINOR 42 ; Main Install settings Name "${APPNAMEANDVERSION}" InstallDir "$PROGRAMFILES\Notepad++" InstallDirRegKey HKLM "Software\${APPNAME}" "" -OutFile "..\bin\npp.5.4.1.Installer.exe" +OutFile "..\bin\npp.5.4.2.Installer.exe" ; GetWindowsVersion ; @@ -730,6 +730,16 @@ SubSection "Themes" Themes File "..\bin\themes\Vibrant Ink.xml" SectionEnd + Section "Deep Black" DeepBlack + SetOutPath "$INSTDIR\themes" + File "..\bin\themes\Deep Black.xml" + SectionEnd + + Section "vim Dark Blue" vimDarkBlue + SetOutPath "$INSTDIR\themes" + File "..\bin\themes\vim Dark Blue.xml" + SectionEnd + SubSectionEnd Section /o "As default html viewer" htmlViewer @@ -1039,6 +1049,16 @@ SubSection un.Themes Delete "$INSTDIR\themes\Vibrant Ink.xml" RMDir "$INSTDIR\themes\" SectionEnd + + Section un.DeepBlack + Delete "$INSTDIR\themes\Deep Black.xml" + RMDir "$INSTDIR\themes\" + SectionEnd + + Section un.vimDarkBlue + Delete "$INSTDIR\themes\vim Dark Blue.xml" + RMDir "$INSTDIR\themes\" + SectionEnd SubSectionEnd Section un.htmlViewer diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index 3fb59e3c..54670350 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -425,9 +425,14 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = BufferID; - #define NPPN_READONLYCHANGED (NPPN_FIRST + 16) // To notify plugins that current document change the readonly status + #define NPPN_READONLYCHANGED (NPPN_FIRST + 16) // To notify plugins that current document change the readonly status, //scnNotification->nmhdr.code = NPPN_READONLYCHANGED; - //scnNotification->nmhdr.hwndFrom = hwndNpp; - //scnNotification->nmhdr.idFrom = isReadOnlyActivated; + //scnNotification->nmhdr.hwndFrom = bufferID; + //scnNotification->nmhdr.idFrom = docStatus; + // where bufferID is BufferID + // docStatus can be combined by DOCSTAUS_READONLY and DOCSTAUS_BUFFERDIRTY + + #define DOCSTAUS_READONLY 1 + #define DOCSTAUS_BUFFERDIRTY 2 #endif //NOTEPAD_PLUS_MSGS_H diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 1539bc58..0c81d329 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2628,7 +2628,7 @@ BOOL Notepad_plus::notify(SCNotification *notification) ::ScreenToClient(_hSelf, &p); HWND hWin = ::RealChildWindowFromPoint(_hSelf, p); - static generic_string tip; + static generic_string tip = TEXT(""); int id = int(lpttt->hdr.idFrom); if (hWin == _rebarTop.getHSelf()) @@ -5310,6 +5310,29 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode, int x, int y) void Notepad_plus::docGotoAnotherEditView(FileTransferMode mode) { + // Test if it's only doc to transfer on the hidden view + // If so then do nothing + if (mode == TransferMove) + { + if (_pDocTab->nbItem() == 1) + { + ScintillaEditView *pOtherView = NULL; + if (_pEditView == &_mainEditView) + { + pOtherView = &_subEditView; + } + else if (_pEditView == &_subEditView) + { + pOtherView = &_mainEditView; + } + else + return; + + if (!pOtherView->isVisible()) + return; + } + } + //First put the doc in the other view if not present (if it is, activate it). //Then if needed close in the original tab BufferID current = _pEditView->getCurrentBufferID(); @@ -9686,6 +9709,23 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask) { } } + if (mask & (BufferChangeReadonly)) + { + checkDocState(); + + bool isSysReadOnly = buffer->getFileReadOnly(); + bool isUserReadOnly = buffer->getUserReadOnly(); + bool isDirty = buffer->isDirty(); + + // To notify plugins ro status is changed + SCNotification scnN; + scnN.nmhdr.hwndFrom = (void *)buffer->getID(); + scnN.nmhdr.idFrom = (uptr_t) ((isSysReadOnly || isUserReadOnly? DOCSTAUS_READONLY : 0) | (isDirty ? DOCSTAUS_BUFFERDIRTY : 0)); + scnN.nmhdr.code = NPPN_READONLYCHANGED; + _pluginsManager.notify(&scnN); + + } + if (!mainActive && !subActive) { return; @@ -9751,7 +9791,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask) { // To notify plugins ro status is changed SCNotification scnN; scnN.nmhdr.code = NPPN_READONLYCHANGED; - scnN.nmhdr.hwndFrom = _hSelf; + scnN.nmhdr.hwndFrom = buffer; scnN.nmhdr.idFrom = int(isSysReadOnly || isUserReadOnly); _pluginsManager.notify(&scnN); } diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 7d8b5cda..06e491d9 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -583,7 +583,7 @@ BEGIN GROUPBOX "GNU General Public Licence",IDC_STATIC,19,75,231,131,BS_CENTER DEFPUSHBUTTON "Ok",IDOK,106,215,50,14,BS_FLAT,WS_EX_STATICEDGE LTEXT "Author :",IDC_STATIC,21,41,31,8 - LTEXT "Don HO",IDC_AUTHOR_NAME,78,41,25,8 + LTEXT "Notepad++ team",IDC_AUTHOR_NAME,78,41,70,8 LTEXT "Home Page :",IDC_STATIC,21,54,47,8 LTEXT "http://notepad-plus.sourceforge.net/",IDC_HOME_ADDR,78,54,126,8 EDITTEXT IDC_LICENCE_EDIT,31,99,209,96,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL diff --git a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp index a89139ee..28dbd033 100644 --- a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp +++ b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp @@ -45,7 +45,8 @@ BOOL CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) ::SendMessage(licenceEditHandle, WM_SETTEXT, 0, (LPARAM)LICENCE_TXT); _emailLink.init(_hInst, _hSelf); - _emailLink.create(::GetDlgItem(_hSelf, IDC_AUTHOR_NAME), TEXT("mailto:don.h@free.fr")); + //_emailLink.create(::GetDlgItem(_hSelf, IDC_AUTHOR_NAME), TEXT("mailto:don.h@free.fr")); + _emailLink.create(::GetDlgItem(_hSelf, IDC_AUTHOR_NAME), TEXT("http://sourceforge.net/project/memberlist.php?group_id=95717")); _pageLink.init(_hInst, _hSelf); _pageLink.create(::GetDlgItem(_hSelf, IDC_HOME_ADDR), TEXT("http://notepad-plus.sourceforge.net/")); diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.cpp b/PowerEditor/src/WinControls/shortcut/shortcut.cpp index 1ceb1660..1b104192 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.cpp +++ b/PowerEditor/src/WinControls/shortcut/shortcut.cpp @@ -529,9 +529,11 @@ void Accelerator::updateFullMenu() { void Accelerator::updateMenuItemByCommand(CommandShortcut csc) { int cmdID = (int)csc.getID(); - MENUITEMINFO cmdMII; - ::GetMenuItemInfo(_hAccelMenu, cmdID, MF_BYCOMMAND, &cmdMII); - ::ModifyMenu(_hAccelMenu, cmdID, MF_BYCOMMAND|cmdMII.fMask, cmdID, csc.toMenuItemString().c_str()); + + // Ensure that the menu item checks set prior to this update remain in affect. + UINT cmdFlags = GetMenuState(_hAccelMenu, cmdID, MF_BYCOMMAND ); + cmdFlags = MF_BYCOMMAND | (cmdFlags&MF_CHECKED) ? ( MF_CHECKED ) : ( MF_UNCHECKED ); + ::ModifyMenu(_hAccelMenu, cmdID, cmdFlags, cmdID, csc.toMenuItemString().c_str()); } recordedMacroStep::recordedMacroStep(int iMessage, long wParam, long lParam) diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index ffff0671..1144396f 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -18,9 +18,9 @@ #ifndef RESOURCE_H #define RESOURCE_H -#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.4.1") -#define VERSION_VALUE TEXT("5.41\0") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 -#define VERSION_DIGITALVALUE 5, 4, 1, 0 +#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.4.2") +#define VERSION_VALUE TEXT("5.42\0") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 +#define VERSION_DIGITALVALUE 5, 4, 2, 0 #ifdef UNICODE #define UNICODE_ANSI_MODE TEXT("(UNICODE)") diff --git a/PowerEditor/visual.net/notepadPlus.vcproj b/PowerEditor/visual.net/notepadPlus.vcproj index e7bce8a3..425489dd 100644 --- a/PowerEditor/visual.net/notepadPlus.vcproj +++ b/PowerEditor/visual.net/notepadPlus.vcproj @@ -142,7 +142,7 @@ RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" - WarningLevel="4" + WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" />