mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
[RELEASE_4_82] Notepad++ v4.8.2 release.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@144 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
88edc71a7d
commit
b271777e83
@ -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) :
|
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.
|
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
|
1. TexFX v0.24a
|
||||||
2. NppExec v0.2 RC3.2
|
2. NppExec v0.2 RC3.2
|
||||||
3. Spell Checker v1.3.1
|
3. Spell Checker v1.3.1
|
||||||
4. Hex editor v0.84
|
4. Base64 encoder/decoder v1.2
|
||||||
5. Base64 encoder/decoder v1.2
|
5. FTP_synchronize v0.9.6
|
||||||
6. FTP_synchronize v0.9.6
|
6. NppExport v0.2.7.3
|
||||||
7. NppExport v0.2.7.2
|
7. Compare plugin v1.5.1
|
||||||
8. Compare plugin v1.5.1
|
8. Light Explorer v1.4
|
||||||
9. Light Explorer v1.4
|
|
||||||
|
@ -17,16 +17,16 @@
|
|||||||
|
|
||||||
; Define the application name
|
; Define the application name
|
||||||
!define APPNAME "Notepad++"
|
!define APPNAME "Notepad++"
|
||||||
!define APPNAMEANDVERSION "Notepad++ v4.8.1"
|
!define APPNAMEANDVERSION "Notepad++ v4.8.2"
|
||||||
|
|
||||||
!define VERSION_MAJOR 4
|
!define VERSION_MAJOR 4
|
||||||
!define VERSION_MINOR 81
|
!define VERSION_MINOR 82
|
||||||
|
|
||||||
; Main Install settings
|
; Main Install settings
|
||||||
Name "${APPNAMEANDVERSION}"
|
Name "${APPNAMEANDVERSION}"
|
||||||
InstallDir "$PROGRAMFILES\Notepad++"
|
InstallDir "$PROGRAMFILES\Notepad++"
|
||||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
||||||
OutFile "..\bin\npp.4.8.1.Installer.exe"
|
OutFile "..\bin\npp.4.8.2.Installer.exe"
|
||||||
|
|
||||||
; GetWindowsVersion
|
; GetWindowsVersion
|
||||||
;
|
;
|
||||||
@ -464,10 +464,12 @@ GLOBAL_INST:
|
|||||||
Delete "$SMPROGRAMS\Notepad++\Notepad++.lnk"
|
Delete "$SMPROGRAMS\Notepad++\Notepad++.lnk"
|
||||||
Delete "$SMPROGRAMS\Notepad++\readme.lnk"
|
Delete "$SMPROGRAMS\Notepad++\readme.lnk"
|
||||||
Delete "$SMPROGRAMS\Notepad++\Uninstall.lnk"
|
Delete "$SMPROGRAMS\Notepad++\Uninstall.lnk"
|
||||||
|
|
||||||
CreateDirectory "$SMPROGRAMS\Notepad++"
|
CreateDirectory "$SMPROGRAMS\Notepad++"
|
||||||
CreateShortCut "$SMPROGRAMS\Notepad++\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\Notepad++\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
|
; remove unstable plugins
|
||||||
|
Delete "$INSTDIR\plugins\HexEditor.dll"
|
||||||
|
|
||||||
; detect the right of
|
; detect the right of
|
||||||
UserInfo::GetAccountType
|
UserInfo::GetAccountType
|
||||||
Pop $1
|
Pop $1
|
||||||
@ -624,13 +626,13 @@ SubSection "Plugins" Plugins
|
|||||||
SetOutPath "$INSTDIR\plugins"
|
SetOutPath "$INSTDIR\plugins"
|
||||||
File "..\bin\plugins\LightExplorer.dll"
|
File "..\bin\plugins\LightExplorer.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
/*
|
||||||
Section "Hex Editor" HexEditor
|
Section "Hex Editor" HexEditor
|
||||||
Delete "$INSTDIR\plugins\HexEditorPlugin.dll"
|
Delete "$INSTDIR\plugins\HexEditorPlugin.dll"
|
||||||
SetOutPath "$INSTDIR\plugins"
|
SetOutPath "$INSTDIR\plugins"
|
||||||
File "..\bin\plugins\HexEditor.dll"
|
File "..\bin\plugins\HexEditor.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
/*
|
|
||||||
Section "ConvertExt" ConvertExt
|
Section "ConvertExt" ConvertExt
|
||||||
SetOutPath "$INSTDIR\plugins"
|
SetOutPath "$INSTDIR\plugins"
|
||||||
File "..\bin\plugins\ConvertExt.dll"
|
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"
|
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name" "" "$INSTDIR\nppIExplorerShell.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
InstType "o"
|
||||||
|
|
||||||
Section "Auto-Updater" AutoUpdater
|
Section "Auto-Updater" AutoUpdater
|
||||||
SetOutPath "$INSTDIR\updater"
|
SetOutPath "$INSTDIR\updater"
|
||||||
File "..\bin\updater\GUP.exe"
|
File "..\bin\updater\GUP.exe"
|
||||||
@ -859,12 +863,12 @@ SubSection un.Plugins
|
|||||||
Delete "$INSTDIR\lightExplorer.ini"
|
Delete "$INSTDIR\lightExplorer.ini"
|
||||||
RMDir "$INSTDIR\plugins\"
|
RMDir "$INSTDIR\plugins\"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
/*
|
||||||
Section un.HexEditor
|
Section un.HexEditor
|
||||||
Delete "$INSTDIR\plugins\HexEditor.dll"
|
Delete "$INSTDIR\plugins\HexEditor.dll"
|
||||||
RMDir "$INSTDIR\plugins\"
|
RMDir "$INSTDIR\plugins\"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
/*
|
|
||||||
Section un.ConvertExt
|
Section un.ConvertExt
|
||||||
Delete "$INSTDIR\plugins\ConvertExt.dll"
|
Delete "$INSTDIR\plugins\ConvertExt.dll"
|
||||||
|
|
||||||
|
@ -3349,9 +3349,13 @@ void Notepad_plus::command(int id)
|
|||||||
::OpenClipboard(_hSelf);
|
::OpenClipboard(_hSelf);
|
||||||
HANDLE clipboardData = ::GetClipboardData(CF_TEXT);
|
HANDLE clipboardData = ::GetClipboardData(CF_TEXT);
|
||||||
int len = ::GlobalSize(clipboardData);
|
int len = ::GlobalSize(clipboardData);
|
||||||
|
LPVOID clipboardDataPtr = ::GlobalLock(clipboardData);
|
||||||
|
|
||||||
HANDLE allocClipboardData = ::GlobalAlloc(GMEM_MOVEABLE, len);
|
HANDLE allocClipboardData = ::GlobalAlloc(GMEM_MOVEABLE, len);
|
||||||
HANDLE clipboardData2 = ::GlobalLock(allocClipboardData);
|
LPVOID clipboardData2 = ::GlobalLock(allocClipboardData);
|
||||||
::memcpy(clipboardData2, clipboardData, len);
|
|
||||||
|
::memcpy(clipboardData2, clipboardDataPtr, len);
|
||||||
|
::GlobalUnlock(clipboardData);
|
||||||
::GlobalUnlock(allocClipboardData);
|
::GlobalUnlock(allocClipboardData);
|
||||||
::CloseClipboard();
|
::CloseClipboard();
|
||||||
|
|
||||||
@ -3376,7 +3380,8 @@ void Notepad_plus::command(int id)
|
|||||||
::SetClipboardData(CF_TEXT, clipboardData2);
|
::SetClipboardData(CF_TEXT, clipboardData2);
|
||||||
::CloseClipboard();
|
::CloseClipboard();
|
||||||
|
|
||||||
::GlobalFree(allocClipboardData);
|
//Do not free anything, EmptyClipboard does that
|
||||||
|
//::GlobalFree(allocClipboardData);
|
||||||
_pEditView->execute(SCI_EMPTYUNDOBUFFER);
|
_pEditView->execute(SCI_EMPTYUNDOBUFFER);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -6183,7 +6188,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
// Update context menu strings
|
// Update context menu strings
|
||||||
vector<MenuItemUnit> & tmp = pNppParam->getContextMenuItems();
|
vector<MenuItemUnit> & tmp = pNppParam->getContextMenuItems();
|
||||||
size_t len = tmp.size();
|
size_t len = tmp.size();
|
||||||
char menuName[64];
|
char menuName[nameLenMax];
|
||||||
*menuName = 0;
|
*menuName = 0;
|
||||||
size_t j, stlen;
|
size_t j, stlen;
|
||||||
for (size_t i = 0 ; i < len ; i++)
|
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
|
//This will automatically do all translations, since menu translation has been done already
|
||||||
vector<CommandShortcut> & shortcuts = pNppParam->getUserShortcuts();
|
vector<CommandShortcut> & shortcuts = pNppParam->getUserShortcuts();
|
||||||
len = shortcuts.size();
|
len = shortcuts.size();
|
||||||
int readI, writeI;
|
int readI;
|
||||||
for(size_t i = 0; i < len; i++) {
|
for(size_t i = 0; i < len; i++) {
|
||||||
CommandShortcut & csc = shortcuts[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)) {
|
if (::GetMenuString(_mainMenuHandle, csc.getID(), menuName, 64, MF_BYCOMMAND)) {
|
||||||
readI = 0; writeI = 0;
|
readI = 0;
|
||||||
while(menuName[readI] != 0)
|
while(menuName[readI] != 0)
|
||||||
{
|
{
|
||||||
if (menuName[readI] == '&')
|
|
||||||
{
|
|
||||||
readI++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (menuName[readI] == '\t')
|
if (menuName[readI] == '\t')
|
||||||
{
|
{
|
||||||
menuName[writeI] = 0;
|
menuName[readI] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
menuName[writeI] = menuName[readI];
|
|
||||||
writeI++;
|
|
||||||
readI++;
|
readI++;
|
||||||
}
|
}
|
||||||
menuName[writeI] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
csc.setName(menuName);
|
csc.setName(menuName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Translate non-menu shortcuts
|
//Translate non-menu shortcuts
|
||||||
changeShortcutLang();
|
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);
|
activateNextDoc((GET_APPCOMMAND_LPARAM(lParam) == APPCOMMAND_BROWSER_FORWARD)?dirDown:dirUp);
|
||||||
_linkTriggered = true;
|
_linkTriggered = true;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return ::DefWindowProc(hwnd, Message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_GETNBSESSIONFILES :
|
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();
|
const KeyCombo & key = macro.getKeyCombo();
|
||||||
TiXmlNode *macroRoot = macrosRoot->InsertEndChild(TiXmlElement("Macro"));
|
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("Ctrl", key._isCtrl?"yes":"no");
|
||||||
macroRoot->ToElement()->SetAttribute("Alt", key._isAlt?"yes":"no");
|
macroRoot->ToElement()->SetAttribute("Alt", key._isAlt?"yes":"no");
|
||||||
macroRoot->ToElement()->SetAttribute("Shift", key._isShift?"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();
|
const KeyCombo & key = userCmd.getKeyCombo();
|
||||||
TiXmlNode *cmdRoot = userCmdRoot->InsertEndChild(TiXmlElement("Command"));
|
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("Ctrl", key._isCtrl?"yes":"no");
|
||||||
cmdRoot->ToElement()->SetAttribute("Alt", key._isAlt?"yes":"no");
|
cmdRoot->ToElement()->SetAttribute("Alt", key._isAlt?"yes":"no");
|
||||||
cmdRoot->ToElement()->SetAttribute("Shift", key._isShift?"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
|
IDD_SHORTCUTMAPPER_DLG DIALOGEX 0, 0, 391, 344
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||||
WS_SYSMENU
|
WS_SYSMENU
|
||||||
EXSTYLE WS_EX_TOOLWINDOW
|
//EXSTYLE WS_EX_TOOLWINDOW
|
||||||
CAPTION "Shortcut mapper"
|
CAPTION "Shortcut mapper"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -94,11 +94,11 @@ BEGIN
|
|||||||
RTEXT "Max number history file :",IDC_MAXNBFILE_STATIC,196,18,112,8
|
RTEXT "Max number history file :",IDC_MAXNBFILE_STATIC,196,18,112,8
|
||||||
LTEXT "0",IDC_MAXNBFILEVAL_STATIC,315,18,15,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 "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,
|
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,
|
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
|
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 "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
|
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;
|
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 {
|
string ScintillaKeyMap::toString() const {
|
||||||
return toString(0);
|
return toString(0);
|
||||||
}
|
}
|
||||||
@ -322,12 +342,11 @@ void getNameStrFromCmd(DWORD cmd, string & str)
|
|||||||
|
|
||||||
BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (Message)
|
switch (Message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG :
|
case WM_INITDIALOG :
|
||||||
{
|
{
|
||||||
::SetDlgItemText(_hSelf, IDC_NAME_EDIT, _name);
|
::SetDlgItemText(_hSelf, IDC_NAME_EDIT, getMenuName()); //display the menu name, with ampersands
|
||||||
if (!_canModifyName)
|
if (!_canModifyName)
|
||||||
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, EM_SETREADONLY, TRUE, 0);
|
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, EM_SETREADONLY, TRUE, 0);
|
||||||
int textlen = (int)::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, WM_GETTEXTLENGTH, 0, 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()) {
|
if (!isEnabled()) {
|
||||||
_keyCombo._isCtrl = _keyCombo._isAlt = _keyCombo._isShift = false;
|
_keyCombo._isCtrl = _keyCombo._isAlt = _keyCombo._isShift = false;
|
||||||
}
|
}
|
||||||
if (_canModifyName)
|
if (_canModifyName) {
|
||||||
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, WM_GETTEXT, nameLenMax, (LPARAM)_name);
|
char editName[nameLenMax];
|
||||||
|
::SendDlgItemMessage(_hSelf, IDC_NAME_EDIT, WM_GETTEXT, nameLenMax, (LPARAM)editName);
|
||||||
|
setName(editName);
|
||||||
|
}
|
||||||
::EndDialog(_hSelf, 0);
|
::EndDialog(_hSelf, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -411,7 +433,6 @@ BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
|
|||||||
default :
|
default :
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ struct KeyCombo {
|
|||||||
class Shortcut : public StaticDialog {
|
class Shortcut : public StaticDialog {
|
||||||
public:
|
public:
|
||||||
Shortcut(): _canModifyName(false) {
|
Shortcut(): _canModifyName(false) {
|
||||||
_name[0] = '\0';
|
setName("");
|
||||||
_keyCombo._isCtrl = false;
|
_keyCombo._isCtrl = false;
|
||||||
_keyCombo._isAlt = false;
|
_keyCombo._isAlt = false;
|
||||||
_keyCombo._isShift = false;
|
_keyCombo._isShift = false;
|
||||||
@ -80,8 +80,11 @@ public:
|
|||||||
|
|
||||||
Shortcut(const char *name, bool isCtrl, bool isAlt, bool isShift, unsigned char key) : _canModifyName(false) {
|
Shortcut(const char *name, bool isCtrl, bool isAlt, bool isShift, unsigned char key) : _canModifyName(false) {
|
||||||
_name[0] = '\0';
|
_name[0] = '\0';
|
||||||
if (name)
|
if (name) {
|
||||||
strcpy(_name, name);
|
setName(name);
|
||||||
|
} else {
|
||||||
|
setName("");
|
||||||
|
}
|
||||||
_keyCombo._isCtrl = isCtrl;
|
_keyCombo._isCtrl = isCtrl;
|
||||||
_keyCombo._isAlt = isAlt;
|
_keyCombo._isAlt = isAlt;
|
||||||
_keyCombo._isShift = isShift;
|
_keyCombo._isShift = isShift;
|
||||||
@ -89,7 +92,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Shortcut(const Shortcut & sc) {
|
Shortcut(const Shortcut & sc) {
|
||||||
lstrcpyn(_name, sc._name, nameLenMax);
|
setName(sc.getMenuName());
|
||||||
_keyCombo = sc._keyCombo;
|
_keyCombo = sc._keyCombo;
|
||||||
_canModifyName = sc._canModifyName;
|
_canModifyName = sc._canModifyName;
|
||||||
}
|
}
|
||||||
@ -101,14 +104,15 @@ public:
|
|||||||
Shortcut & operator=(const Shortcut & sc) {
|
Shortcut & operator=(const Shortcut & sc) {
|
||||||
//Do not allow setting empty names
|
//Do not allow setting empty names
|
||||||
//So either we have an empty name or the other name has to be set
|
//So either we have an empty name or the other name has to be set
|
||||||
if (_name[0] == 0 || sc._name[0] != 0)
|
if (_name[0] == 0 || sc._name[0] != 0) {
|
||||||
lstrcpyn(_name, sc._name, nameLenMax);
|
setName(sc.getMenuName());
|
||||||
|
}
|
||||||
_keyCombo = sc._keyCombo;
|
_keyCombo = sc._keyCombo;
|
||||||
this->_canModifyName = sc._canModifyName;
|
this->_canModifyName = sc._canModifyName;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
friend inline const bool operator==(const Shortcut & a, const Shortcut & b) {
|
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._isCtrl == b._keyCombo._isCtrl) &&
|
||||||
(a._keyCombo._isAlt == b._keyCombo._isAlt) &&
|
(a._keyCombo._isAlt == b._keyCombo._isAlt) &&
|
||||||
(a._keyCombo._isShift == b._keyCombo._isShift) &&
|
(a._keyCombo._isShift == b._keyCombo._isShift) &&
|
||||||
@ -141,7 +145,7 @@ public:
|
|||||||
|
|
||||||
virtual string toString() const; //the hotkey part
|
virtual string toString() const; //the hotkey part
|
||||||
string toMenuItemString() const { //string suitable for menu
|
string toMenuItemString() const { //string suitable for menu
|
||||||
string str = _name;
|
string str = _menuName;
|
||||||
if(isEnabled())
|
if(isEnabled())
|
||||||
{
|
{
|
||||||
str += "\t";
|
str += "\t";
|
||||||
@ -157,15 +161,18 @@ public:
|
|||||||
return _name;
|
return _name;
|
||||||
};
|
};
|
||||||
|
|
||||||
void setName(const char * name) {
|
const char * getMenuName() const {
|
||||||
lstrcpyn(_name, name, nameLenMax);
|
return _menuName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setName(const char * name);
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
KeyCombo _keyCombo;
|
KeyCombo _keyCombo;
|
||||||
virtual BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
virtual BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
bool _canModifyName;
|
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 {
|
class CommandShortcut : public Shortcut {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<!-- 2 status : "show" or "hide"-->
|
<!-- 2 status : "show" or "hide"-->
|
||||||
<GUIConfig name="StatusBar">show</GUIConfig>
|
<GUIConfig name="StatusBar">show</GUIConfig>
|
||||||
<!-- For all attributs, 2 status : "yes" or "no"-->
|
<!-- 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"-->
|
<!-- 2 positions : "horizontal" or "vertical"-->
|
||||||
<GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
|
<GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
|
||||||
<!-- For the attribut of position, 2 status : docked or undocked ; 2 status : "show" or "hide" -->
|
<!-- For the attribut of position, 2 status : docked or undocked ; 2 status : "show" or "hide" -->
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
#ifndef RESOURCE_H
|
#ifndef RESOURCE_H
|
||||||
#define RESOURCE_H
|
#define RESOURCE_H
|
||||||
|
|
||||||
#define NOTEPAD_PLUS_VERSION "Notepad++ v4.8.1"
|
#define NOTEPAD_PLUS_VERSION "Notepad++ v4.8.2"
|
||||||
#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_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, 1, 0
|
#define VERSION_DIGITALVALUE 4, 8, 2, 0
|
||||||
|
|
||||||
#ifndef IDC_STATIC
|
#ifndef IDC_STATIC
|
||||||
#define IDC_STATIC -1
|
#define IDC_STATIC -1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user