[RELEASE_4_82] Notepad++ v4.8.2 release.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@144 f5eea248-9336-0410-98b8-ebc06183d4e3
remotes/patch_testing@481 v4.8.2
Don Ho 17 years ago
parent 3b2de402a0
commit 032869a202

@ -1,3 +1,13 @@
Notepad++ v4.8.2 fixed bugs and added features (from v4.8.1) :
1. Fix unicode input problem for non-western language.
2. Add the capacity (behaviour) of keeping line highlighting even when Notepad++ loss its focus.
3. Fix missing fonts problem in font list of Stylers configurator.
4. Fix the hot key problem : make Alt+f+s work again.
5. Fix the hardware problem : make keyboard commands (such as "e-mail", "calculator",
"sound", ...) works again.
Notepad++ v4.8.1 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.
@ -30,9 +40,9 @@ Included plugins :
1. TexFX v0.24a
2. NppExec v0.2 RC3.2
3. Spell Checker v1.3.1
4. Hex editor v0.84
5. Base64 encoder/decoder v1.2
6. FTP_synchronize v0.9.6
7. NppExport v0.2.7.2
8. Compare plugin v1.5.1
9. Light Explorer v1.4
4. Base64 encoder/decoder v1.2
5. FTP_synchronize v0.9.6
6. NppExport v0.2.7.3
7. Compare plugin v1.5.1
8. Light Explorer v1.4

@ -17,16 +17,16 @@
; Define the application name
!define APPNAME "Notepad++"
!define APPNAMEANDVERSION "Notepad++ v4.8.1"
!define APPNAMEANDVERSION "Notepad++ v4.8.2"
!define VERSION_MAJOR 4
!define VERSION_MINOR 81
!define VERSION_MINOR 82
; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\Notepad++"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "..\bin\npp.4.8.1.Installer.exe"
OutFile "..\bin\npp.4.8.2.Installer.exe"
; GetWindowsVersion
;
@ -464,10 +464,12 @@ GLOBAL_INST:
Delete "$SMPROGRAMS\Notepad++\Notepad++.lnk"
Delete "$SMPROGRAMS\Notepad++\readme.lnk"
Delete "$SMPROGRAMS\Notepad++\Uninstall.lnk"
CreateDirectory "$SMPROGRAMS\Notepad++"
CreateShortCut "$SMPROGRAMS\Notepad++\Uninstall.lnk" "$INSTDIR\uninstall.exe"
; remove unstable plugins
Delete "$INSTDIR\plugins\HexEditor.dll"
; detect the right of
UserInfo::GetAccountType
Pop $1
@ -624,13 +626,13 @@ SubSection "Plugins" Plugins
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\LightExplorer.dll"
SectionEnd
/*
Section "Hex Editor" HexEditor
Delete "$INSTDIR\plugins\HexEditorPlugin.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\HexEditor.dll"
SectionEnd
/*
Section "ConvertExt" ConvertExt
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\ConvertExt.dll"
@ -706,6 +708,8 @@ Section /o "As default html viewer" htmlViewer
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name" "" "$INSTDIR\nppIExplorerShell.exe"
SectionEnd
InstType "o"
Section "Auto-Updater" AutoUpdater
SetOutPath "$INSTDIR\updater"
File "..\bin\updater\GUP.exe"
@ -859,12 +863,12 @@ SubSection un.Plugins
Delete "$INSTDIR\lightExplorer.ini"
RMDir "$INSTDIR\plugins\"
SectionEnd
/*
Section un.HexEditor
Delete "$INSTDIR\plugins\HexEditor.dll"
RMDir "$INSTDIR\plugins\"
SectionEnd
/*
Section un.ConvertExt
Delete "$INSTDIR\plugins\ConvertExt.dll"

@ -3349,9 +3349,13 @@ void Notepad_plus::command(int id)
::OpenClipboard(_hSelf);
HANDLE clipboardData = ::GetClipboardData(CF_TEXT);
int len = ::GlobalSize(clipboardData);
LPVOID clipboardDataPtr = ::GlobalLock(clipboardData);
HANDLE allocClipboardData = ::GlobalAlloc(GMEM_MOVEABLE, len);
HANDLE clipboardData2 = ::GlobalLock(allocClipboardData);
::memcpy(clipboardData2, clipboardData, len);
LPVOID clipboardData2 = ::GlobalLock(allocClipboardData);
::memcpy(clipboardData2, clipboardDataPtr, len);
::GlobalUnlock(clipboardData);
::GlobalUnlock(allocClipboardData);
::CloseClipboard();
@ -3376,7 +3380,8 @@ void Notepad_plus::command(int id)
::SetClipboardData(CF_TEXT, clipboardData2);
::CloseClipboard();
::GlobalFree(allocClipboardData);
//Do not free anything, EmptyClipboard does that
//::GlobalFree(allocClipboardData);
_pEditView->execute(SCI_EMPTYUNDOBUFFER);
}
break;
@ -6183,7 +6188,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
// Update context menu strings
vector<MenuItemUnit> & tmp = pNppParam->getContextMenuItems();
size_t len = tmp.size();
char menuName[64];
char menuName[nameLenMax];
*menuName = 0;
size_t j, stlen;
for (size_t i = 0 ; i < len ; i++)
@ -6213,33 +6218,25 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
//This will automatically do all translations, since menu translation has been done already
vector<CommandShortcut> & shortcuts = pNppParam->getUserShortcuts();
len = shortcuts.size();
int readI, writeI;
int readI;
for(size_t i = 0; i < len; i++) {
CommandShortcut & csc = shortcuts[i];
if (!csc.getName()[0]) {
if (!csc.getName()[0]) { //no predefined name, get name from menu and use that
if (::GetMenuString(_mainMenuHandle, csc.getID(), menuName, 64, MF_BYCOMMAND)) {
readI = 0; writeI = 0;
readI = 0;
while(menuName[readI] != 0)
{
if (menuName[readI] == '&')
{
readI++;
continue;
}
if (menuName[readI] == '\t')
{
menuName[writeI] = 0;
menuName[readI] = 0;
break;
}
menuName[writeI] = menuName[readI];
writeI++;
readI++;
}
menuName[writeI] = 0;
}
}
csc.setName(menuName);
}
}
//Translate non-menu shortcuts
changeShortcutLang();
@ -6797,7 +6794,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
activateNextDoc((GET_APPCOMMAND_LPARAM(lParam) == APPCOMMAND_BROWSER_FORWARD)?dirDown:dirUp);
_linkTriggered = true;
}
return TRUE;
return ::DefWindowProc(hwnd, Message, wParam, lParam);
}
case NPPM_GETNBSESSIONFILES :
@ -8138,3 +8135,4 @@ winVer getWindowsVersion()

@ -1428,7 +1428,7 @@ void NppParameters::insertMacro(TiXmlNode *macrosRoot, const MacroShortcut & mac
{
const KeyCombo & key = macro.getKeyCombo();
TiXmlNode *macroRoot = macrosRoot->InsertEndChild(TiXmlElement("Macro"));
macroRoot->ToElement()->SetAttribute("name", macro.getName());
macroRoot->ToElement()->SetAttribute("name", macro.getMenuName());
macroRoot->ToElement()->SetAttribute("Ctrl", key._isCtrl?"yes":"no");
macroRoot->ToElement()->SetAttribute("Alt", key._isAlt?"yes":"no");
macroRoot->ToElement()->SetAttribute("Shift", key._isShift?"yes":"no");
@ -1449,7 +1449,7 @@ void NppParameters::insertUserCmd(TiXmlNode *userCmdRoot, const UserCommand & us
{
const KeyCombo & key = userCmd.getKeyCombo();
TiXmlNode *cmdRoot = userCmdRoot->InsertEndChild(TiXmlElement("Command"));
cmdRoot->ToElement()->SetAttribute("name", userCmd.getName());
cmdRoot->ToElement()->SetAttribute("name", userCmd.getMenuName());
cmdRoot->ToElement()->SetAttribute("Ctrl", key._isCtrl?"yes":"no");
cmdRoot->ToElement()->SetAttribute("Alt", key._isAlt?"yes":"no");
cmdRoot->ToElement()->SetAttribute("Shift", key._isShift?"yes":"no");
@ -3966,3 +3966,4 @@ void NppParameters::addScintillaModifiedIndex(int index)
}

@ -28,7 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
IDD_SHORTCUTMAPPER_DLG DIALOGEX 0, 0, 391, 344
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
//EXSTYLE WS_EX_TOOLWINDOW
CAPTION "Shortcut mapper"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN

@ -94,11 +94,11 @@ BEGIN
RTEXT "Max number history file :",IDC_MAXNBFILE_STATIC,196,18,112,8
LTEXT "0",IDC_MAXNBFILEVAL_STATIC,315,18,15,8
CONTROL "Enable",IDC_CHECK_FILEAUTODETECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,29,65,98,10
CONTROL "Minimize to sys tray",IDC_CHECK_MIN2SYSTRAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,102,130,10
CONTROL "Minimize to sys tray",IDC_CHECK_MIN2SYSTRAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,163,130,10
CONTROL "Remember the current session for next launch",IDC_CHECK_REMEMBERSESSION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,163,217,11
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,133,217,11
CONTROL "Enable Notepad++ auto-updater",IDC_CHECK_AUTOUPDATE,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,16,133,150,10
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,16,102,150,10
GROUPBOX "File Status Auto-detection",IDC_FILEAUTODETECTION_STATIC,16,54,144,39,BS_CENTER
CONTROL "Update silently",IDC_CHECK_UPDATESILENTLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,29,78,103,10
CONTROL "Enable",IDC_CHECK_CLICKABLELINK_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,65,98,10

@ -175,6 +175,26 @@ string Shortcut::toString() const
return sc;
}
void Shortcut::setName(const char * name) {
lstrcpyn(_menuName, name, nameLenMax);
lstrcpyn(_name, name, nameLenMax);
int i = 0, j = 0;
while(name[j] != 0 && i < nameLenMax) {
if (name[j] != '&') {
_name[i] = name[j];
i++;
} else { //check if this ampersand is being escaped
if (name[j+1] == '&') { //escaped ampersand
_name[i] = name[j];
i++;
j++; //skip escaped ampersand
}
}
j++;
}
_name[i] = 0;
}
string ScintillaKeyMap::toString() const {
return toString(0);
}
@ -322,12 +342,11 @@ void getNameStrFromCmd(DWORD cmd, string & str)
BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
{
switch (Message)
{
case WM_INITDIALOG :
{
::SetDlgItemText(_hSelf, IDC_NAME_EDIT, _name);
::SetDlgItemText(_hSelf, IDC_NAME_EDIT, getMenuName()); //display the menu name, with ampersands
if (!_canModifyName)
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, EM_SETREADONLY, TRUE, 0);
int textlen = (int)::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, WM_GETTEXTLENGTH, 0, 0);
@ -376,8 +395,11 @@ BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
if (!isEnabled()) {
_keyCombo._isCtrl = _keyCombo._isAlt = _keyCombo._isShift = false;
}
if (_canModifyName)
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, WM_GETTEXT, nameLenMax, (LPARAM)_name);
if (_canModifyName) {
char editName[nameLenMax];
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, WM_GETTEXT, nameLenMax, (LPARAM)editName);
setName(editName);
}
::EndDialog(_hSelf, 0);
return TRUE;
@ -411,7 +433,6 @@ BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
default :
return FALSE;
}
return FALSE;
}

@ -71,7 +71,7 @@ struct KeyCombo {
class Shortcut : public StaticDialog {
public:
Shortcut(): _canModifyName(false) {
_name[0] = '\0';
setName("");
_keyCombo._isCtrl = false;
_keyCombo._isAlt = false;
_keyCombo._isShift = false;
@ -80,8 +80,11 @@ public:
Shortcut(const char *name, bool isCtrl, bool isAlt, bool isShift, unsigned char key) : _canModifyName(false) {
_name[0] = '\0';
if (name)
strcpy(_name, name);
if (name) {
setName(name);
} else {
setName("");
}
_keyCombo._isCtrl = isCtrl;
_keyCombo._isAlt = isAlt;
_keyCombo._isShift = isShift;
@ -89,7 +92,7 @@ public:
};
Shortcut(const Shortcut & sc) {
lstrcpyn(_name, sc._name, nameLenMax);
setName(sc.getMenuName());
_keyCombo = sc._keyCombo;
_canModifyName = sc._canModifyName;
}
@ -101,14 +104,15 @@ public:
Shortcut & operator=(const Shortcut & sc) {
//Do not allow setting empty names
//So either we have an empty name or the other name has to be set
if (_name[0] == 0 || sc._name[0] != 0)
lstrcpyn(_name, sc._name, nameLenMax);
if (_name[0] == 0 || sc._name[0] != 0) {
setName(sc.getMenuName());
}
_keyCombo = sc._keyCombo;
this->_canModifyName = sc._canModifyName;
return *this;
}
friend inline const bool operator==(const Shortcut & a, const Shortcut & b) {
return ((strcmp(a._name, b._name) == 0) &&
return ((strcmp(a.getMenuName(), b.getMenuName()) == 0) &&
(a._keyCombo._isCtrl == b._keyCombo._isCtrl) &&
(a._keyCombo._isAlt == b._keyCombo._isAlt) &&
(a._keyCombo._isShift == b._keyCombo._isShift) &&
@ -141,8 +145,8 @@ public:
virtual string toString() const; //the hotkey part
string toMenuItemString() const { //string suitable for menu
string str = _name;
if(isEnabled())
string str = _menuName;
if(isEnabled())
{
str += "\t";
str += toString();
@ -157,15 +161,18 @@ public:
return _name;
};
void setName(const char * name) {
lstrcpyn(_name, name, nameLenMax);
const char * getMenuName() const {
return _menuName;
}
void setName(const char * name);
protected :
KeyCombo _keyCombo;
virtual BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
bool _canModifyName;
char _name[nameLenMax];
char _name[nameLenMax]; //normal name is plain text (for display purposes)
char _menuName[nameLenMax]; //menu name has ampersands for quick keys
};
class CommandShortcut : public Shortcut {

@ -6,7 +6,7 @@
<!-- 2 status : "show" or "hide"-->
<GUIConfig name="StatusBar">show</GUIConfig>
<!-- For all attributs, 2 status : "yes" or "no"-->
<GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="yes" doubleClick2Close="no" vertical="no" multiLine="yes" hide="no" />
<GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="no" doubleClick2Close="no" vertical="no" multiLine="no" hide="no" />
<!-- 2 positions : "horizontal" or "vertical"-->
<GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
<!-- For the attribut of position, 2 status : docked or undocked ; 2 status : "show" or "hide" -->

@ -18,9 +18,9 @@
#ifndef RESOURCE_H
#define RESOURCE_H
#define NOTEPAD_PLUS_VERSION "Notepad++ v4.8.1"
#define VERSION_VALUE "4.8.1\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
#define VERSION_DIGITALVALUE 4, 8, 1, 0
#define NOTEPAD_PLUS_VERSION "Notepad++ v4.8.2"
#define VERSION_VALUE "4.8.2\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
#define VERSION_DIGITALVALUE 4, 8, 2, 0
#ifndef IDC_STATIC
#define IDC_STATIC -1

Loading…
Cancel
Save