Notepad++ release 7.4 - make name right

Change "Document Snapshot" to "Document Peeker".
Fix a peeker bug on reading from setting file.
pull/2997/merge
Don HO 2017-05-14 20:26:23 +02:00
parent 481a275ad6
commit 66d91d93bb
7 changed files with 33 additions and 39 deletions

View File

@ -1,7 +1,7 @@
Notepad++ 7.4 new featurs/enhancements & bug-fixs:
1. Add document snapshot feature.
2. Add snapshot on document map feature.
1. Add document peek feature.
2. Add peek on document map feature.
3. Fix issue with clicking links in html/js/asp/php.
4. Fix folding vetical line loses colour after changing folding style via Preference dialog.
5. Enhance folding feature (multi-line quotes) for python.

View File

@ -151,10 +151,10 @@ BOOL Notepad_plus::notify(SCNotification *notification)
case TCN_MOUSEHOVERSWITCHING:
{
NppParameters *pNppParam = NppParameters::getInstance();
bool doSnapshot = pNppParam->getNppGUI()._isDocSnapshotOnTab;
bool doSnapshotOnMap = pNppParam->getNppGUI()._isDocSnapshotOnMap;
bool doPeekOnTab = pNppParam->getNppGUI()._isDocPeekOnTab;
bool doPeekOnMap = pNppParam->getNppGUI()._isDocPeekOnMap;
if (doSnapshot)
if (doPeekOnTab)
{
TBHDR *tbHdr = reinterpret_cast<TBHDR *>(notification);
DocTabView *pTabDocView = isFromPrimary ? &_mainDocTab : (isFromSecondary ? &_subDocTab : nullptr);
@ -185,7 +185,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
}
}
if (doSnapshotOnMap && _pDocMap && (!_pDocMap->isClosed()) && _pDocMap->isVisible())
if (doPeekOnMap && _pDocMap && (!_pDocMap->isClosed()) && _pDocMap->isVisible())
{
TBHDR *tbHdr = reinterpret_cast<TBHDR *>(notification);
DocTabView *pTabDocView = isFromPrimary ? &_mainDocTab : (isFromSecondary ? &_subDocTab : nullptr);
@ -217,15 +217,15 @@ BOOL Notepad_plus::notify(SCNotification *notification)
case TCN_MOUSELEAVING:
{
NppParameters *pNppParam = NppParameters::getInstance();
bool doSnapshot = pNppParam->getNppGUI()._isDocSnapshotOnTab;
bool doSnapshotOnMap = pNppParam->getNppGUI()._isDocSnapshotOnMap;
bool doPeekOnTab = pNppParam->getNppGUI()._isDocPeekOnTab;
bool doPeekOnMap = pNppParam->getNppGUI()._isDocPeekOnMap;
if (doSnapshot)
if (doPeekOnTab)
{
_documentSnapshot.display(false);
}
if (doSnapshotOnMap && _pDocMap && (!_pDocMap->isClosed()) && _pDocMap->isVisible())
if (doPeekOnMap && _pDocMap && (!_pDocMap->isClosed()) && _pDocMap->isVisible())
{
_pDocMap->reloadMap();
_pDocMap->setSyntaxHiliting();
@ -368,13 +368,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
activateBuffer(bufid, iView);
_isFolding = false;
}
bool doSnapshot = true;
if (doSnapshot)
{
_documentSnapshot.display(false);
}
_documentSnapshot.display(false);
break;
}

View File

@ -4807,13 +4807,13 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
if (optNameFolderDroppedOpenFiles)
_nppGUI._isFolderDroppedOpenFiles = (lstrcmp(optNameFolderDroppedOpenFiles, TEXT("yes")) == 0);
const TCHAR * optdocSnapshotOnTab = element->Attribute(TEXT("docSnapshotOnTab"));
if (optdocSnapshotOnTab)
_nppGUI._isDocSnapshotOnTab = (lstrcmp(optdocSnapshotOnTab, TEXT("yes")) == 0);
const TCHAR * optDocPeekOnTab = element->Attribute(TEXT("docPeekOnTab"));
if (optDocPeekOnTab)
_nppGUI._isDocPeekOnTab = (lstrcmp(optDocPeekOnTab, TEXT("yes")) == 0);
const TCHAR * optdocSnapshotOnMap = element->Attribute(TEXT("docSnapshotOnMap"));
if (optdocSnapshotOnTab)
_nppGUI._isDocSnapshotOnMap = (lstrcmp(optdocSnapshotOnMap, TEXT("yes")) == 0);
const TCHAR * optDocPeekOnMap = element->Attribute(TEXT("docPeekOnMap"));
if (optDocPeekOnMap)
_nppGUI._isDocPeekOnMap = (lstrcmp(optDocPeekOnMap, TEXT("yes")) == 0);
}
}
@ -5536,8 +5536,8 @@ void NppParameters::createXmlTreeFromGUIParams()
GUIConfigElement->SetAttribute(TEXT("backSlashIsEscapeCharacterForSql"), _nppGUI._backSlashIsEscapeCharacterForSql ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("newStyleSaveDlg"), _nppGUI._useNewStyleSaveDlg ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("isFolderDroppedOpenFiles"), _nppGUI._isFolderDroppedOpenFiles ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("docSnapshotOnTab"), _nppGUI._isDocSnapshotOnTab ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("docSnapshotOnMap"), _nppGUI._isDocSnapshotOnMap ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("docPeekOnTab"), _nppGUI._isDocPeekOnTab ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("docPeekOnMap"), _nppGUI._isDocPeekOnMap ? TEXT("yes") : TEXT("no"));
}
// <GUIConfig name="searchEngine" searchEngineChoice="2" searchEngineCustom="" />

View File

@ -847,8 +847,8 @@ struct NppGUI final
bool _isFolderDroppedOpenFiles = false;
bool _isDocSnapshotOnTab = true;
bool _isDocSnapshotOnMap = false;
bool _isDocPeekOnTab = true;
bool _isDocPeekOnMap = false;
};
struct ScintillaViewParams

View File

@ -120,8 +120,8 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL "Enable",IDC_CHECK_ENABLEDOCSWITCHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,15,140,10
CONTROL "Enable MRU behaviour",IDC_CHECK_STYLEMRU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,28,140,10
CONTROL "Snapshot on tab",IDC_CHECK_ENABLEDOCSNAPSHOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,58,140,10
CONTROL "Snapshot on document map",IDC_CHECK_ENABLEDOCSNAPSHOTONMAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,71,140,10
CONTROL "Peek on tab",IDC_CHECK_ENABLEDOCPEEKER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,58,140,10
CONTROL "Peek on document map", IDC_CHECK_ENABLEDOCPEEKONMAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,71,140,10
CONTROL "Autodetect character encoding",IDC_CHECK_DETECTENCODING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,98,217,10
CONTROL "Auto-indent",IDC_CHECK_MAINTAININDENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,113,150,10
@ -143,7 +143,7 @@ BEGIN
EDITTEXT IDC_EDIT_WORKSPACEFILEEXT,381,152,34,14,ES_AUTOHSCROLL
GROUPBOX "Document Switcher (Ctrl+TAB)",IDC_DOCUMENTSWITCHER_STATIC,37,4,155,39,BS_CENTER
GROUPBOX "Clickable Link Settings",IDC_CLICKABLELINK_STATIC,259,4,155,39,BS_CENTER
GROUPBOX "Document Snapshot",IDC_DOCUMENTSNAPSHOT_STATIC,37,47,155,39,BS_CENTER
GROUPBOX "Document Peeker",IDC_DOCUMENTPEEK_STATIC,37,47,155,39,BS_CENTER
GROUPBOX "File Status Auto-Detection",IDC_FILEAUTODETECTION_STATIC,259,47,155,50,BS_CENTER
RTEXT "Session file ext.:",IDC_SESSIONFILEEXT_STATIC,271,138,108,8
RTEXT "Workspace file ext.:",IDC_WORKSPACEFILEEXT_STATIC,271,155,108,8

View File

@ -897,8 +897,8 @@ INT_PTR CALLBACK SettingsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
::SendDlgItemMessage(_hSelf, IDC_CHECK_DETECTENCODING, BM_SETCHECK, nppGUI._detectEncoding, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_AUTOUPDATE, BM_SETCHECK, nppGUI._autoUpdateOpt._doAutoUpdate, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_BACKSLASHISESCAPECHARACTERFORSQL, BM_SETCHECK, nppGUI._backSlashIsEscapeCharacterForSql, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_ENABLEDOCSNAPSHOT, BM_SETCHECK, nppGUI._isDocSnapshotOnTab ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_ENABLEDOCSNAPSHOTONMAP, BM_SETCHECK, nppGUI._isDocSnapshotOnMap ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_ENABLEDOCPEEKER, BM_SETCHECK, nppGUI._isDocPeekOnTab ? BST_CHECKED : BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_ENABLEDOCPEEKONMAP, BM_SETCHECK, nppGUI._isDocPeekOnMap ? BST_CHECKED : BST_UNCHECKED, 0);
::ShowWindow(::GetDlgItem(_hSelf, IDC_CHECK_AUTOUPDATE), nppGUI._doesExistUpdater?SW_SHOW:SW_HIDE);
@ -1081,15 +1081,15 @@ INT_PTR CALLBACK SettingsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
return TRUE;
}
case IDC_CHECK_ENABLEDOCSNAPSHOT:
case IDC_CHECK_ENABLEDOCPEEKER:
{
nppGUI._isDocSnapshotOnTab = isCheckedOrNot(IDC_CHECK_ENABLEDOCSNAPSHOT);
nppGUI._isDocPeekOnTab = isCheckedOrNot(IDC_CHECK_ENABLEDOCPEEKER);
return TRUE;
}
case IDC_CHECK_ENABLEDOCSNAPSHOTONMAP:
case IDC_CHECK_ENABLEDOCPEEKONMAP:
{
nppGUI._isDocSnapshotOnMap = isCheckedOrNot(IDC_CHECK_ENABLEDOCSNAPSHOTONMAP);
nppGUI._isDocPeekOnMap = isCheckedOrNot(IDC_CHECK_ENABLEDOCPEEKONMAP);
return TRUE;
}
}

View File

@ -201,9 +201,9 @@
#define IDC_REMEMBEREDITVIEWPERFILE_STATIC (IDD_PREFERENCE_SETTING_BOX + 42)
#define IDC_EDIT_REMEMBEREDITVIEWPERFILE (IDD_PREFERENCE_SETTING_BOX + 43)
#define IDC_DOCUMENTSNAPSHOT_STATIC (IDD_PREFERENCE_SETTING_BOX + 44)
#define IDC_CHECK_ENABLEDOCSNAPSHOT (IDD_PREFERENCE_SETTING_BOX + 45)
#define IDC_CHECK_ENABLEDOCSNAPSHOTONMAP (IDD_PREFERENCE_SETTING_BOX + 46)
#define IDC_DOCUMENTPEEK_STATIC (IDD_PREFERENCE_SETTING_BOX + 44)
#define IDC_CHECK_ENABLEDOCPEEKER (IDD_PREFERENCE_SETTING_BOX + 45)
#define IDC_CHECK_ENABLEDOCPEEKONMAP (IDD_PREFERENCE_SETTING_BOX + 46)
#define IDD_PREFERENCE_NEWDOCSETTING_BOX 6400 //(IDD_PREFERENCE_BOX + 400)