Add tooltip for filter usage in Find in Files dialog

This commit is contained in:
Don HO 2019-11-22 14:28:13 +01:00
parent 90176b21ae
commit f44c357999
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
7 changed files with 28 additions and 19 deletions

View File

@ -1164,6 +1164,11 @@
<cloud-select-folder value="選擇一個資料夾,以便 Notepad++ 從中讀取/寫入其設定。"/>
<shift-change-direction-tip value="使用「Shift + Enter」以相反方向進行搜索"/>
<two-find-buttons-tip value="顯示「找上一個」按鈕"/>
<find-in-files-filter-tip value="只在 cpp, cxx, h, hxx &amp;&amp; hpp :
*.cpp *.cxx *.h *.hxx *.hpp
所有檔案除了 exe, obj &amp;&amp; log 之外:
*.* !*.exe !*.obj !*.log"/>
<find-status-top-reached value="搜尋:從下面找到相符的字串。搜尋已抵達文件開首。"/>
<find-status-end-reached value="搜尋:從上面找到相符的字串。搜尋已抵達文件結尾。"/>
<find-status-replaceinfiles-1-replaced value="在檔案中取代:取代了 1 個字串。"/>

View File

@ -1195,6 +1195,11 @@ Continue?"/>
<cloud-select-folder value="Select a folder from/to where Notepad++ reads/writes its settings"/>
<shift-change-direction-tip value="Use Shift+Enter to search in the opposite direction"/>
<two-find-buttons-tip value="2 find buttons mode"/>
<find-in-files-filter-tip value="Find in cpp, cxx, h, hxx &amp;&amp; hpp:
*.cpp *.cxx *.h *.hxx *.hpp
Find in all files except exe, obj &amp;&amp; log:
*.* !*.exe !*.obj !*.log"/>
<find-status-top-reached value="Find: Found the 1st occurrence from the bottom. The beginning of the document has been reached."/>
<find-status-end-reached value="Find: Found the 1st occurrence from the top. The end of the document has been reached."/>
<find-status-replaceinfiles-1-replaced value="Replace in Files: 1 occurrence was replaced"/>

View File

@ -1170,6 +1170,11 @@ Voulez-vous les poursuivez ?"/>
<cloud-restart-warning value="Veuillez redémarrer Notepad++ afin que le changement prenne effet."/>
<shift-change-direction-tip value="Utilisez Shift + Entrée pour rechercher dans le sens inverse"/>
<two-find-buttons-tip value="2 boutons Recherche"/>
<find-in-files-filter-tip value="Rechercher dans cpp, cxx, h, hxx &amp;&amp; hpp:
*.cpp *.cxx *.h *.hxx *.hpp
Rechercher dans tous les fichiers sauf exe, obj &amp;&amp; log:
*.* !*.exe !*.obj !*.log"/>
<cloud-select-folder value="Sélectionner un répertoire où Notepad++ lit ou écrit ses paramètres"/>
<find-status-top-reached value="Rechercher : La 1ère occurrence a été trouvée depuis le bas. Le début du document a été atteint"/>
<find-status-end-reached value="Rechercher : La 1ère occurrence a été trouvée depuis le haut. La fin du document a été atteinte"/>

View File

@ -1052,6 +1052,11 @@ HWND CreateToolTip(int toolID, HWND hDlg, HINSTANCE hInst, const PTSTR pszText)
return NULL;
}
SendMessage(hwndTip, TTM_ACTIVATE, TRUE, 0);
SendMessage(hwndTip, TTM_SETMAXTIPWIDTH, 0, 200);
// Make tip stay 15 seconds
SendMessage(hwndTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
return hwndTip;
}

View File

@ -245,6 +245,9 @@ FindReplaceDlg::~FindReplaceDlg()
if (_2ButtonsTip)
::DestroyWindow(_2ButtonsTip);
if (_filterTip)
::DestroyWindow(_filterTip);
if (_hMonospaceFont)
::DeleteObject(_hMonospaceFont);
@ -868,29 +871,15 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
_countInSelFramePos.top = countP.y - 9;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
generic_string searchButtonTip = pNativeSpeaker->getLocalizedStrFromID("shift-change-direction-tip", TEXT("Use Shift+Enter to search in the opposite direction."));
generic_string searchButtonTip = pNativeSpeaker->getLocalizedStrFromID("shift-change-direction-tip", TEXT("Use Shift+Enter to search in the opposite direction."));
_shiftTrickUpTip = CreateToolTip(IDOK, _hSelf, _hInst, const_cast<PTSTR>(searchButtonTip.c_str()));
if (_shiftTrickUpTip)
{
SendMessage(_shiftTrickUpTip, TTM_ACTIVATE, TRUE, 0);
SendMessage(_shiftTrickUpTip, TTM_SETMAXTIPWIDTH, 0, 200);
// Make tip stay 15 seconds
SendMessage(_shiftTrickUpTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
}
generic_string checkboxTip = pNativeSpeaker->getLocalizedStrFromID("two-find-buttons-tip", TEXT("2 find buttons mode"));
_2ButtonsTip = CreateToolTip(IDC_2_BUTTONS_MODE, _hSelf, _hInst, const_cast<PTSTR>(checkboxTip.c_str()));
if (_2ButtonsTip)
{
SendMessage(_2ButtonsTip, TTM_ACTIVATE, TRUE, 0);
SendMessage(_2ButtonsTip, TTM_SETMAXTIPWIDTH, 0, 200);
// Make tip stay 15 seconds
SendMessage(_2ButtonsTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
}
generic_string findInFilesFilterTip = pNativeSpeaker->getLocalizedStrFromID("find-in-files-filter-tip", TEXT("Find in cpp, cxx, h, hxx && hpp:\r*.cpp *.cxx *.h *.hxx *.hpp\r\rFind in all files except exe, obj && log:\r*.* !*.exe !*.obj !*.log"));
_filterTip = CreateToolTip(IDD_FINDINFILES_FILTERS_STATIC, _hSelf, _hInst, const_cast<PTSTR>(findInFilesFilterTip.c_str()));
::SetWindowTextW(::GetDlgItem(_hSelf, IDC_FINDPREV), TEXT(""));
::SetWindowTextW(::GetDlgItem(_hSelf, IDC_FINDNEXT), TEXT("▼ Find Next"));

View File

@ -362,7 +362,7 @@ private :
HWND _shiftTrickUpTip = nullptr;
HWND _2ButtonsTip = nullptr;
HWND _filterTip = nullptr;
bool _isRTL = false;

View File

@ -41,7 +41,7 @@ BEGIN
COMBOBOX IDFINDWHAT,83,20,178,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_TABSTOP
RTEXT "Rep&lace with :",ID_STATICTEXT_REPLACE,6,40,75,8
COMBOBOX IDREPLACEWITH,83,38,178,50,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_TABSTOP
RTEXT "Filter&s :",IDD_FINDINFILES_FILTERS_STATIC,27,58,53,8
RTEXT "Filter&s :",IDD_FINDINFILES_FILTERS_STATIC,27,58,53,8, SS_NOTIFY
COMBOBOX IDD_FINDINFILES_FILTERS_COMBO,83,56,178,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_TABSTOP
RTEXT "Dir&ectory :",IDD_FINDINFILES_DIR_STATIC,7,76,40,8
COMBOBOX IDD_FINDINFILES_DIR_COMBO,49,74,190,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_TABSTOP