diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log index 62edde581..bb2ce6215 100644 --- a/PowerEditor/bin/change.log +++ b/PowerEditor/bin/change.log @@ -1,4 +1,4 @@ -Notepad++ v4.7.2 fixed bugs and added features (from v4.6) : +Notepad++ v4.7.3 fixed bugs and added features (from v4.6) : 1. Make the "recovery system" for 3 mandatory xml files (config.xml, langs.xml and stylers.xml) to prevent the fail loading due to the corrupted files. 2. Extend plugin capacity - add the Scintilla external lexer capacity. @@ -27,5 +27,5 @@ Included plugins : 5. Explorer plugin v1.6.1 6. Hex editor v0.84 7. Base64 encoder/decoder v1.2 -8. FTP_synchronize v0.9.5.1 +8. FTP_synchronize v0.9.6 9. NppExport v0.2.5.0 diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index e82e1f666..6911178d8 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.2" +!define APPNAMEANDVERSION "Notepad++ v4.7.3" !define VERSION_MAJOR 4 -!define VERSION_MINOR 72 +!define VERSION_MINOR 73 ; Main Install settings Name "${APPNAMEANDVERSION}" InstallDir "$PROGRAMFILES\Notepad++" InstallDirRegKey HKLM "Software\${APPNAME}" "" -OutFile "..\bin\npp.4.7.2.Installer.exe" +OutFile "..\bin\npp.4.7.3.Installer.exe" @@ -328,6 +328,7 @@ GLOBAL_INST: File "..\bin\stylers.model.xml" SetOverwrite off + File /oname=$INSTDIR\langs.xml "..\bin\langs.model.xml" File "..\bin\contextMenu.xml" File "..\bin\shortcuts.xml" diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f02d78851..53a855180 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1700,6 +1700,15 @@ BOOL Notepad_plus::notify(SCNotification *notification) _statusBar.setText((_pEditView->execute(SCI_GETOVERTYPE))?"OVR":"INS", STATUSBAR_TYPING_MODE); } } + else if (notification->nmhdr.hwndFrom == _mainDocTab.getHSelf()) + { + switchEditViewTo(MAIN_VIEW); + } + else if (notification->nmhdr.hwndFrom == _subDocTab.getHSelf()) + { + switchEditViewTo(SUB_VIEW); + } + break; } @@ -3373,6 +3382,12 @@ void Notepad_plus::command(int id) break; } + case IDM_WIKIFAQ: + { + ::ShellExecute(NULL, "open", "http://notepad-plus.wiki.sourceforge.net/FAQ", NULL, NULL, SW_SHOWNORMAL); + break; + } + case IDM_FORUM: { ::ShellExecute(NULL, "open", "http://sourceforge.net/forum/?group_id=95717", NULL, NULL, SW_SHOWNORMAL); diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 64e7169fa..6678f45fe 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -476,7 +476,8 @@ BEGIN MENUITEM "Notepad++ Home", IDM_HOMESWEETHOME MENUITEM "Notepad++ Project Page", IDM_PROJECTPAGE MENUITEM "Online help", IDM_ONLINEHELP - MENUITEM "Forum", IDM_FORUM + MENUITEM "Wiki FAQ", IDM_WIKIFAQ + MENUITEM "Forums", IDM_FORUM MENUITEM "Get more plugins", IDM_PLUGINSHOME MENUITEM SEPARATOR MENUITEM "Update Notepad++", IDM_UPDATE_NPP diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 7a20d7b14..59a3229c3 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -955,6 +955,8 @@ char * ScintillaEditView::activateDocAt(int index) execute(SCI_SETEOLMODE, _buffers[_currentIndex]._format); ::SendMessage(_hParent, NPPM_INTERNAL_DOCSWITCHIN, 0, (LPARAM)_hSelf); + recalcHorizontalScrollbar(); //Update scrollbar after switching file + return _buffers[_currentIndex]._fullPathName; } @@ -1159,6 +1161,7 @@ void ScintillaEditView::marginClick(int position, int modifiers) execute(SCI_TOGGLEFOLD, lineClick, 0); } } + recalcHorizontalScrollbar(); //Update scrollbar after folding } void ScintillaEditView::expand(int &line, bool doExpand, bool force, int visLevels, int level) @@ -1684,9 +1687,14 @@ void ScintillaEditView::recalcHorizontalScrollbar() { endLine--; long beginPosition, endPosition; - for( int i = startLine ; i <= endLine ; i++ ) { //for all _visible_ lines - endPosition = execute(SCI_GETLINEENDPOSITION, i); //get character position from begin - beginPosition = execute(SCI_POSITIONFROMLINE, i); //and end of line + int visibleLine = 0; + for( int i = startLine ; i <= endLine ; i++ ) + { + //for all _visible_ lines + visibleLine = (int) execute(SCI_DOCLINEFROMVISIBLE, i); //get actual visible line, folding may offset lines + endPosition = execute(SCI_GETLINEENDPOSITION, visibleLine); //get character position from begin + beginPosition = execute(SCI_POSITIONFROMLINE, visibleLine); //and end of line + curLen = execute(SCI_POINTXFROMPOSITION, 0, endPosition) - //Then let Scintilla get pixel width with execute(SCI_POINTXFROMPOSITION, 0, beginPosition); //current styler if (maxPixel < curLen) { //If its the largest line yet @@ -1700,4 +1708,6 @@ void ScintillaEditView::recalcHorizontalScrollbar() { int currentLength = execute(SCI_GETSCROLLWIDTH); //Get current scrollbar size if (currentLength != maxPixel) //And if it is not the same execute(SCI_SETSCROLLWIDTH, maxPixel); //update it + + ::ShowScrollBar(_hSelf, SB_HORZ, TRUE); //Force scrollbar visible to prevent 'twitchy' behaviour } \ No newline at end of file diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index 523d81f2a..7fac0067b 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -203,11 +203,10 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara } ::CallWindowProc(_tabBarDefaultProc, hwnd, Message, wParam, lParam); + if (wParam == 2) return TRUE; - - if (_doDragNDrop) { _nSrcTab = _nTabDragged = ::SendMessage(_hSelf, TCM_GETCURSEL, 0, 0); @@ -220,19 +219,24 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara // Yes, we're beginning to drag, so capture the mouse... _isDragging = true; ::SetCapture(hwnd); - return TRUE; } - break; } - else - return TRUE; + + NMHDR nmhdr; + nmhdr.hwndFrom = _hSelf; + nmhdr.code = NM_CLICK; + nmhdr.idFrom = reinterpret_cast(this); + + ::SendMessage(_hParent, WM_NOTIFY, 0, reinterpret_cast(&nmhdr)); + + return TRUE; } case WM_MOUSEMOVE : { if (_isDragging) { - POINT p; + POINT p; p.x = LOWORD(lParam); p.y = HIWORD(lParam); exchangeItemData(p); diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 660eae585..1491e6817 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -245,7 +245,7 @@ #define IDM_FORUM (IDM_ABOUT + 4) #define IDM_PLUGINSHOME (IDM_ABOUT + 5) #define IDM_UPDATE_NPP (IDM_ABOUT + 6) - + #define IDM_WIKIFAQ (IDM_ABOUT + 7) #define IDM_SETTING (IDM + 8000) diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index cfb4630a9..8b678f295 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 "Notepad++ v4.7.2" -#define VERSION_VALUE "4.72\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 -#define VERSION_DIGITALVALUE 4, 7, 2, 0 +#define NOTEPAD_PLUS_VERSION "Notepad++ v4.7.3" +#define VERSION_VALUE "4.73\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 +#define VERSION_DIGITALVALUE 4, 7, 3, 0 #ifndef IDC_STATIC #define IDC_STATIC -1 diff --git a/PowerEditor/src/winmain.cpp b/PowerEditor/src/winmain.cpp index e11ad2a56..d56a55406 100644 --- a/PowerEditor/src/winmain.cpp +++ b/PowerEditor/src/winmain.cpp @@ -255,7 +255,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh bool going = true; while (going) { - going = unicodeSupported?(::GetMessageW(&msg, NULL, 0, 0)):(::GetMessageA(&msg, NULL, 0, 0)); + going = (unicodeSupported?(::GetMessageW(&msg, NULL, 0, 0)):(::GetMessageA(&msg, NULL, 0, 0))) != 0; if (going) { // if the message doesn't belong to the notepad_plus_plus's dialog