diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index 8dfff791d..c7368a13f 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.4" -!define APPNAMEANDVERSION "Notepad++ v5.4.4" +!define APPVERSION "5.4.5" +!define APPNAMEANDVERSION "Notepad++ v5.4.5" !define APPWEBSITE "http://notepad-plus.sourceforge.net/" !define VERSION_MAJOR 5 -!define VERSION_MINOR 44 +!define VERSION_MINOR 45 ; Main Install settings Name "${APPNAMEANDVERSION}" InstallDir "$PROGRAMFILES\Notepad++" InstallDirRegKey HKLM "Software\${APPNAME}" "" -OutFile "..\bin\npp.5.4.4.Installer.exe" +OutFile "..\bin\npp.5.4.5.Installer.exe" ; GetWindowsVersion ; @@ -740,6 +740,10 @@ SubSection "Themes" Themes File "..\bin\themes\vim Dark Blue.xml" SectionEnd + Section "Bespin" Bespin + SetOutPath "$INSTDIR\themes" + File "..\bin\themes\Bespin.xml" + SectionEnd SubSectionEnd Section /o "As default html viewer" htmlViewer @@ -1059,6 +1063,11 @@ SubSection un.Themes Delete "$INSTDIR\themes\vim Dark Blue.xml" RMDir "$INSTDIR\themes\" SectionEnd + + Section un.Bespin + Delete "$INSTDIR\themes\Bespin.xml" + RMDir "$INSTDIR\themes\" + SectionEnd SubSectionEnd Section un.htmlViewer diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index dd362345f..19790c79a 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -768,9 +768,8 @@ protected: case L_BATCH: case L_TXT: case L_MAKEFILE: - case L_SQL: + //case L_SQL: case L_ASM: - //case L_TEX: case L_HASKELL: case L_PROPS: case L_SMALLTALK: diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp index 7cff46093..32c124172 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp @@ -402,7 +402,7 @@ LRESULT DockingCont::runProcCaption(HWND hwnd, UINT Message, WPARAM wParam, LPAR toolTip.init(_hInst, hwnd); if (_hoverMPos == posCaption) { - toolTip.Show(rc, _pszCaption, pt.x, pt.y + 20); + toolTip.Show(rc, _pszCaption.c_str(), pt.x, pt.y + 20); } else { @@ -445,7 +445,7 @@ void DockingCont::drawCaptionItem(DRAWITEMSTRUCT *pDrawItemStruct) HBITMAP hBmpCur = NULL; HBITMAP hBmpOld = NULL; HBITMAP hBmpNew = NULL; - UINT length = lstrlen(_pszCaption); + UINT length = _pszCaption.length(); INT nSavedDC = ::SaveDC(hDc); @@ -490,11 +490,11 @@ void DockingCont::drawCaptionItem(DRAWITEMSTRUCT *pDrawItemStruct) rc.top += 1; rc.right -= 16; hOldFont = (HFONT)::SelectObject(hDc, _hFont); - ::DrawText(hDc, _pszCaption, length, &rc, DT_LEFT | DT_SINGLELINE | DT_VCENTER | DT_END_ELLIPSIS | DT_NOPREFIX); + ::DrawText(hDc, _pszCaption.c_str(), length, &rc, DT_LEFT | DT_SINGLELINE | DT_VCENTER | DT_END_ELLIPSIS | DT_NOPREFIX); // calculate text size and if its trankated... SIZE size = {0}; - GetTextExtentPoint32(hDc, _pszCaption, length, &size); + GetTextExtentPoint32(hDc, _pszCaption.c_str(), length, &size); _bCaptionTT = (((rc.right - rc.left) < size.cx) ? TRUE : FALSE); ::SelectObject(hDc, hOldFont); @@ -541,11 +541,11 @@ void DockingCont::drawCaptionItem(DRAWITEMSTRUCT *pDrawItemStruct) TEXT("MS Shell Dlg")); hOldFont = (HFONT)::SelectObject(hDc, hFont); - ::DrawText(hDc, _pszCaption, length, &rc, DT_BOTTOM | DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX); + ::DrawText(hDc, _pszCaption.c_str(), length, &rc, DT_BOTTOM | DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX); // calculate text size and if its trankated... SIZE size = {0}; - GetTextExtentPoint32(hDc, _pszCaption, length, &size); + GetTextExtentPoint32(hDc, _pszCaption.c_str(), length, &size); _bCaptionTT = (((rc.bottom - rc.top) < size.cy) ? TRUE : FALSE); ::SelectObject(hDc, hOldFont); @@ -1362,23 +1362,23 @@ bool DockingCont::updateCaption() if (!tcItem.lParam) return false; // update caption text - lstrcpy(_pszCaption, ((tTbData*)tcItem.lParam)->pszName); + _pszCaption = ((tTbData*)tcItem.lParam)->pszName; // test if additional information are available if ((((tTbData*)tcItem.lParam)->uMask & DWS_ADDINFO) && (lstrlen(((tTbData*)tcItem.lParam)->pszAddInfo) != 0)) { - lstrcat(_pszCaption, TEXT(" - ")); - lstrcat(_pszCaption, ((tTbData*)tcItem.lParam)->pszAddInfo); + _pszCaption += TEXT(" - "); + _pszCaption += ((tTbData*)tcItem.lParam)->pszAddInfo; } if (_isFloating == true) { - ::SetWindowText(_hSelf, _pszCaption); + ::SetWindowText(_hSelf, _pszCaption.c_str()); } else { - ::SetWindowText(_hCaption, _pszCaption); + ::SetWindowText(_hCaption, _pszCaption.c_str()); } return true; } diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingCont.h b/PowerEditor/src/WinControls/DockingWnd/DockingCont.h index 347d31e28..ccc0a813e 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.h @@ -26,6 +26,7 @@ #include #include #include +#include "Common.h" using namespace std; @@ -194,7 +195,8 @@ private: // caption params BOOL _isTopCaption; - TCHAR _pszCaption[256]; + std::generic_string _pszCaption; + BOOL _isMouseDown; BOOL _isMouseClose; BOOL _isMouseOver; diff --git a/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp b/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp index 63cf42097..65a04145c 100644 --- a/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp +++ b/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp @@ -44,7 +44,7 @@ void ToolTip::init(HINSTANCE hInst, HWND hParent) } -void ToolTip::Show(RECT rectTitle, TCHAR * pszTitle, int iXOff, int iWidthOff) +void ToolTip::Show(RECT rectTitle, const TCHAR * pszTitle, int iXOff, int iWidthOff) { if (isVisible()) destroy(); @@ -67,7 +67,8 @@ void ToolTip::Show(RECT rectTitle, TCHAR * pszTitle, int iXOff, int iWidthOff) HFONT _hFont = (HFONT)::SendMessage(_hParent, WM_GETFONT, 0, 0); ::SendMessage(_hSelf, WM_SETFONT, reinterpret_cast(_hFont), TRUE); - _ti.lpszText = pszTitle; + // Bleuargh... const_cast. Will have to do for now. + _ti.lpszText = const_cast(pszTitle); ::SendMessage(_hSelf, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &_ti); ::SendMessage(_hSelf, TTM_TRACKPOSITION, 0, (LPARAM)(DWORD) MAKELONG(_ti.rect.left + iXOff, _ti.rect.top + iWidthOff)); ::SendMessage(_hSelf, TTM_TRACKACTIVATE, true, (LPARAM)(LPTOOLINFO) &_ti); diff --git a/PowerEditor/src/WinControls/ToolTip/ToolTip.h b/PowerEditor/src/WinControls/ToolTip/ToolTip.h index aece63dc3..f854223e6 100644 --- a/PowerEditor/src/WinControls/ToolTip/ToolTip.h +++ b/PowerEditor/src/WinControls/ToolTip/ToolTip.h @@ -43,14 +43,13 @@ public: // Implementation public: virtual void init(HINSTANCE hInst, HWND hParent); - void Show(RECT rectTitle, TCHAR* pszTitleText, int iXOff = 0, int iWidthOff = 0); + void Show(RECT rectTitle, const TCHAR* pszTitleText, int iXOff = 0, int iWidthOff = 0); protected: WNDPROC _defaultProc; BOOL _bTrackMouse; TOOLINFO _ti; - static LRESULT CALLBACK staticWinProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { return (((ToolTip *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(Message, wParam, lParam)); }; diff --git a/PowerEditor/src/stylers.model.xml b/PowerEditor/src/stylers.model.xml index 424ca7a5c..1b6506f57 100644 --- a/PowerEditor/src/stylers.model.xml +++ b/PowerEditor/src/stylers.model.xml @@ -433,16 +433,20 @@ - - - - - - - - - - + + + + + + + + + + + + + + @@ -560,6 +564,19 @@ + + + + + + + + + + + + +