[NEW_FEATURE] Snapshot feature.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1221 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
4c49b023ca
commit
e8b76a28ec
@ -1050,6 +1050,13 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
return (LRESULT)_scintillaCtrls4Plugins.getScintillaEditViewFrom((HWND)lParam);
|
return (LRESULT)_scintillaCtrls4Plugins.getScintillaEditViewFrom((HWND)lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPPM_INTERNAL_ENABLESNAPSHOT:
|
||||||
|
{
|
||||||
|
launchDocumentBackupTask();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
case NPPM_DESTROYSCINTILLAHANDLE :
|
case NPPM_DESTROYSCINTILLAHANDLE :
|
||||||
{
|
{
|
||||||
return _scintillaCtrls4Plugins.destroyScintilla((HWND)lParam);
|
return _scintillaCtrls4Plugins.destroyScintilla((HWND)lParam);
|
||||||
|
@ -2733,6 +2733,7 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
|
|||||||
setFindStatus(findStatus);
|
setFindStatus(findStatus);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case EN_KILLFOCUS :
|
case EN_KILLFOCUS :
|
||||||
case EN_SETFOCUS :
|
case EN_SETFOCUS :
|
||||||
break;
|
break;
|
||||||
|
@ -2216,6 +2216,15 @@ BOOL CALLBACK BackupDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
|||||||
|
|
||||||
case IDC_BACKUPDIR_RESTORESESSION_EDIT:
|
case IDC_BACKUPDIR_RESTORESESSION_EDIT:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
const int stringSize = 16;
|
||||||
|
TCHAR str[stringSize];
|
||||||
|
|
||||||
|
::GetDlgItemText(_hSelf, IDC_BACKUPDIR_RESTORESESSION_EDIT, str, stringSize);
|
||||||
|
|
||||||
|
if (lstrcmp(str, TEXT("")) == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
nppGUI._snapshotBackupTiming = ::GetDlgItemInt(_hSelf, IDC_BACKUPDIR_RESTORESESSION_EDIT, NULL, FALSE) * 1000;
|
nppGUI._snapshotBackupTiming = ::GetDlgItemInt(_hSelf, IDC_BACKUPDIR_RESTORESESSION_EDIT, NULL, FALSE) * 1000;
|
||||||
if (!nppGUI._snapshotBackupTiming)
|
if (!nppGUI._snapshotBackupTiming)
|
||||||
{
|
{
|
||||||
@ -2226,6 +2235,25 @@ BOOL CALLBACK BackupDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (HIWORD(wParam) == EN_KILLFOCUS)
|
||||||
|
{
|
||||||
|
switch (LOWORD(wParam))
|
||||||
|
{
|
||||||
|
case IDC_BACKUPDIR_RESTORESESSION_EDIT:
|
||||||
|
{
|
||||||
|
//printStr(TEXT(""));
|
||||||
|
const int stringSize = 16;
|
||||||
|
TCHAR str[stringSize];
|
||||||
|
|
||||||
|
::GetDlgItemText(_hSelf, IDC_BACKUPDIR_RESTORESESSION_EDIT, str, stringSize);
|
||||||
|
|
||||||
|
if (lstrcmp(str, TEXT("")) == 0)
|
||||||
|
{
|
||||||
|
::SetDlgItemInt(_hSelf, IDC_BACKUPDIR_RESTORESESSION_EDIT, nppGUI._snapshotBackupTiming/1000, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (wParam)
|
switch (wParam)
|
||||||
{
|
{
|
||||||
@ -2237,6 +2265,7 @@ BOOL CALLBACK BackupDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
|||||||
if (nppGUI._isSnapshotMode)
|
if (nppGUI._isSnapshotMode)
|
||||||
{
|
{
|
||||||
// Launch thread
|
// Launch thread
|
||||||
|
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_ENABLESNAPSHOT, 0, 0);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@
|
|||||||
#define NPPM_INTERNAL_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35)
|
#define NPPM_INTERNAL_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35)
|
||||||
#define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36)
|
#define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36)
|
||||||
#define NPPM_INTERNAL_GETSCINTEDTVIEW (NOTEPADPLUS_USER_INTERNAL + 37)
|
#define NPPM_INTERNAL_GETSCINTEDTVIEW (NOTEPADPLUS_USER_INTERNAL + 37)
|
||||||
//#define NPPM_INTERNAL_SETDOCMAPCHECK (NOTEPADPLUS_USER_INTERNAL + 38)
|
#define NPPM_INTERNAL_ENABLESNAPSHOT (NOTEPADPLUS_USER_INTERNAL + 38)
|
||||||
|
|
||||||
//wParam: 0
|
//wParam: 0
|
||||||
//lParam: document new index
|
//lParam: document new index
|
||||||
|
Loading…
Reference in New Issue
Block a user