[RELEASE] Notepad++ 6.6.2 Release.
[BUG_FIXED] Fix session snapshot enabled issue even "remember current session" option is disabled. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1235 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
2aa456f7ca
commit
7bfcda086d
@ -1,10 +1,10 @@
|
||||
Notepad++ v6.6.1 bug fixes:
|
||||
Notepad++ v6.6.2 bug fixes:
|
||||
1. Fix session snapshot enabled issue even "remember current session" option is disabled.
|
||||
|
||||
Notepad++ v6.6.1 bug fixes:
|
||||
1. Fix Notepad++ hanging issue while saving a large file if session snapshot feature is on.
|
||||
|
||||
|
||||
Notepad++ v6.6 new features and bug fixes:
|
||||
|
||||
1. Add session snapshot and periodic backup feature.
|
||||
2. Fix RTL/LTR command making mirrored text bug.
|
||||
3. Make auto-detect character encoding optional.
|
||||
|
Binary file not shown.
@ -28,10 +28,10 @@
|
||||
; Define the application name
|
||||
!define APPNAME "Notepad++"
|
||||
|
||||
!define APPVERSION "6.6.1"
|
||||
!define APPVERSION "6.6.2"
|
||||
!define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}"
|
||||
!define VERSION_MAJOR 6
|
||||
!define VERSION_MINOR 61
|
||||
!define VERSION_MINOR 62
|
||||
|
||||
!define APPWEBSITE "http://notepad-plus-plus.org/"
|
||||
|
||||
|
@ -3207,7 +3207,7 @@ bool Notepad_plus::activateBuffer(BufferID id, int whichOne)
|
||||
{
|
||||
//scnN.nmhdr.code = NPPN_DOCSWITCHINGOFF; //superseeded by NPPN_BUFFERACTIVATED
|
||||
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
@ -4472,7 +4472,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
|
||||
if (doCloseOrNot(buffer->getFullPathName()) == IDNO)
|
||||
{
|
||||
//close in both views, doing current view last since that has to remain opened
|
||||
bool isSnapshotMode = nppGUI._isSnapshotMode;
|
||||
bool isSnapshotMode = nppGUI.isSnapshotMode();
|
||||
doClose(buffer->getID(), otherView(), isSnapshotMode);
|
||||
doClose(buffer->getID(), currentView(), isSnapshotMode);
|
||||
}
|
||||
@ -5769,7 +5769,7 @@ DWORD WINAPI Notepad_plus::backupDocument(void * /*param*/)
|
||||
|
||||
::Sleep(timer);
|
||||
|
||||
isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
if (!isSnapshotMode)
|
||||
break;
|
||||
|
||||
|
@ -289,12 +289,7 @@ public:
|
||||
bool addCurrentMacro();
|
||||
void macroPlayback(Macro);
|
||||
|
||||
void loadLastSession(){
|
||||
Session lastSession = (NppParameters::getInstance())->getSession();
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
loadSession(lastSession, isSnapshotMode);
|
||||
};
|
||||
|
||||
void loadLastSession();
|
||||
bool loadSession(Session & session, bool isSnapshotMode = false);
|
||||
|
||||
void notifyBufferChanged(Buffer * buffer, int mask);
|
||||
|
@ -223,7 +223,7 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin
|
||||
::MessageBoxA(NULL, dest, "", MB_OK);
|
||||
}
|
||||
|
||||
bool isSnapshotMode = nppGUI._isSnapshotMode;
|
||||
bool isSnapshotMode = nppGUI.isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
_notepad_plus_plus_core.checkModifiedDocument();
|
||||
|
@ -1419,7 +1419,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
if (_pTrayIco)
|
||||
_pTrayIco->doTrayIcon(REMOVE);
|
||||
|
||||
bool isSnapshotMode = pNppParam->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = pNppParam->getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
MainFileManager->backupCurrentBuffer();
|
||||
|
||||
|
@ -118,7 +118,7 @@ void Notepad_plus::command(int id)
|
||||
|
||||
case IDM_FILE_CLOSEALL:
|
||||
{
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
fileCloseAll(isSnapshotMode, false);
|
||||
checkDocState();
|
||||
break;
|
||||
|
@ -597,7 +597,7 @@ bool Notepad_plus::fileClose(BufferID id, int curView)
|
||||
viewToClose = curView;
|
||||
//first check amount of documents, we dont want the view to hide if we closed a secondary doc with primary being empty
|
||||
//int nrDocs = _pDocTab->nbItem();
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
doClose(bufferID, viewToClose, isSnapshotMode);
|
||||
return true;
|
||||
}
|
||||
@ -733,7 +733,7 @@ bool Notepad_plus::fileCloseAllGiven(const std::vector<int> &krvecBufferIndexes)
|
||||
}
|
||||
|
||||
// Now we close.
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
for(std::vector<int>::const_iterator itIndex = krvecBufferIndexes.begin(); itIndex != itIndexesEnd; ++itIndex) {
|
||||
doClose(_pDocTab->getBufferByIndex(*itIndex), currentView(), isSnapshotMode);
|
||||
}
|
||||
@ -826,7 +826,7 @@ bool Notepad_plus::fileCloseAllButCurrent()
|
||||
}
|
||||
}
|
||||
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
//Then start closing, inactive view first so the active is left open
|
||||
if (bothActive())
|
||||
{ //first close all docs in non-current view, which gets closed automatically
|
||||
@ -1059,7 +1059,7 @@ bool Notepad_plus::fileDelete(BufferID id)
|
||||
MB_OK);
|
||||
return false;
|
||||
}
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
doClose(bufferID, MAIN_VIEW, isSnapshotMode);
|
||||
doClose(bufferID, SUB_VIEW, isSnapshotMode);
|
||||
return true;
|
||||
@ -1120,6 +1120,15 @@ bool Notepad_plus::isFileSession(const TCHAR * filename) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Notepad_plus::loadLastSession()
|
||||
{
|
||||
NppParameters *nppParams = NppParameters::getInstance();
|
||||
const NppGUI & nppGui = nppParams->getNppGUI();
|
||||
Session lastSession = nppParams->getSession();
|
||||
bool isSnapshotMode = nppGui.isSnapshotMode();
|
||||
loadSession(lastSession, isSnapshotMode);
|
||||
}
|
||||
|
||||
bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode)
|
||||
{
|
||||
NppParameters *pNppParam = NppParameters::getInstance();
|
||||
|
@ -112,7 +112,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
|
||||
if (notification->nmhdr.code == SCN_SAVEPOINTREACHED)
|
||||
{
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
MainFileManager->backupCurrentBuffer();
|
||||
@ -276,7 +276,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
}
|
||||
else if (notification->nmhdr.hwndFrom == _mainDocTab.getHSelf() && _activeView == SUB_VIEW)
|
||||
{
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
@ -287,7 +287,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
}
|
||||
else if (notification->nmhdr.hwndFrom == _subDocTab.getHSelf() && _activeView == MAIN_VIEW)
|
||||
{
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI()._isSnapshotMode;
|
||||
bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
|
@ -4726,7 +4726,7 @@ bool NppParameters::writeGUIParams()
|
||||
element->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
|
||||
element->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());
|
||||
|
||||
element->SetAttribute(TEXT("isSnapshotMode"), _nppGUI._isSnapshotMode?TEXT("yes"):TEXT("no"));
|
||||
element->SetAttribute(TEXT("isSnapshotMode"), _nppGUI._isSnapshotMode && _nppGUI._rememberLastSession?TEXT("yes"):TEXT("no"));
|
||||
element->SetAttribute(TEXT("snapshotBackupTiming"), _nppGUI._snapshotBackupTiming);
|
||||
backExist = true;
|
||||
}
|
||||
@ -5007,7 +5007,7 @@ bool NppParameters::writeGUIParams()
|
||||
GUIConfigElement->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
|
||||
GUIConfigElement->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());
|
||||
|
||||
GUIConfigElement->SetAttribute(TEXT("isSnapshotMode"), _nppGUI._isSnapshotMode?TEXT("yes"):TEXT("no"));
|
||||
GUIConfigElement->SetAttribute(TEXT("isSnapshotMode"), _nppGUI.isSnapshotMode()?TEXT("yes"):TEXT("no"));
|
||||
GUIConfigElement->SetAttribute(TEXT("snapshotBackupTiming"), _nppGUI._snapshotBackupTiming);
|
||||
}
|
||||
|
||||
|
@ -815,12 +815,7 @@ struct NppGUI
|
||||
generic_string _themeName;
|
||||
MultiInstSetting _multiInstSetting;
|
||||
bool _fileSwitcherWithoutExtColumn;
|
||||
/*
|
||||
bool isSnapshotMode() const {return _isSnapshotMode;};
|
||||
void setBackupMode(bool doBackup) {_isSnapshotMode = doBackup;};
|
||||
size_t getBackupTiming() const {return _snapshotBackupTiming;};
|
||||
void setBackupTiming(size_t timing) {_snapshotBackupTiming = timing;};
|
||||
*/
|
||||
bool isSnapshotMode() const {return _isSnapshotMode && _rememberLastSession;};
|
||||
bool _isSnapshotMode;
|
||||
size_t _snapshotBackupTiming;
|
||||
};
|
||||
|
@ -301,7 +301,7 @@ LRESULT DockingCont::runProcCaption(HWND hwnd, UINT Message, WPARAM wParam, LPAR
|
||||
DWORD dwError = ::GetLastError();
|
||||
TCHAR str[128];
|
||||
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed"), MB_OK | MB_ICONERROR);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed on runProcCaption"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
::RedrawWindow(hwnd, NULL, NULL, TRUE);
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ LRESULT DockingSplitter::runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
DWORD dwError = ::GetLastError();
|
||||
TCHAR str[128];
|
||||
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed"), MB_OK | MB_ICONERROR);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed on runProc"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -265,18 +265,18 @@ void Gripper::create()
|
||||
DWORD dwError = ::GetLastError();
|
||||
TCHAR str[128];
|
||||
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed"), MB_OK | MB_ICONERROR);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed on Gripper::create()"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
if (ver < WV_VISTA)
|
||||
{
|
||||
hookKeyboard = ::SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)hookProcKeyboard, _hInst, 0);
|
||||
hookKeyboard = ::SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)hookProcKeyboard, _hInst, ::GetCurrentThreadId());
|
||||
if (!hookKeyboard)
|
||||
{
|
||||
DWORD dwError = ::GetLastError();
|
||||
TCHAR str[128];
|
||||
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(KEYBOARD) failed"), MB_OK | MB_ICONERROR);
|
||||
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(KEYBOARD) failed on Gripper::create()"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
// Removed regarding W9x systems
|
||||
|
@ -2175,7 +2175,7 @@ BOOL CALLBACK BackupDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_REMEMBERSESSION, BM_SETCHECK, nppGUI._rememberLastSession, 0);
|
||||
bool snapshotCheck = nppGUI._rememberLastSession && nppGUI._isSnapshotMode;
|
||||
bool snapshotCheck = nppGUI._rememberLastSession && nppGUI.isSnapshotMode();
|
||||
::SendDlgItemMessage(_hSelf, IDC_BACKUPDIR_RESTORESESSION_CHECK, BM_SETCHECK, snapshotCheck?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
int periodicBackupInSec = nppGUI._snapshotBackupTiming/1000;
|
||||
::SetDlgItemInt(_hSelf, IDC_BACKUPDIR_RESTORESESSION_EDIT, periodicBackupInSec, FALSE);
|
||||
|
@ -29,12 +29,12 @@
|
||||
#ifndef RESOURCE_H
|
||||
#define RESOURCE_H
|
||||
|
||||
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v6.6.1")
|
||||
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v6.6.2")
|
||||
|
||||
// should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
|
||||
// ex : #define VERSION_VALUE TEXT("5.63\0")
|
||||
#define VERSION_VALUE TEXT("6.61\0")
|
||||
#define VERSION_DIGITALVALUE 6, 6, 1, 0
|
||||
#define VERSION_VALUE TEXT("6.62\0")
|
||||
#define VERSION_DIGITALVALUE 6, 6, 2, 0
|
||||
|
||||
#ifdef UNICODE
|
||||
#define UNICODE_ANSI_MODE TEXT("(UNICODE)")
|
||||
|
Loading…
Reference in New Issue
Block a user