[BUG_FIXED] Changing "Search result" stylers via Styler Configurator updates visual effect on the fly now.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@425 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
60f91b7b48
commit
2948c18e3e
|
@ -8224,6 +8224,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case WM_UPDATEFINDERSCINTILLA :
|
||||||
|
{
|
||||||
|
_findReplaceDlg.updateFinderScintilla();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
case WM_QUERYENDSESSION:
|
case WM_QUERYENDSESSION:
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
{
|
{
|
||||||
|
|
|
@ -384,12 +384,20 @@ public :
|
||||||
|
|
||||||
void focusOnFinder() {
|
void focusOnFinder() {
|
||||||
// Show finder and set focus
|
// Show finder and set focus
|
||||||
if (_pFinder) {
|
if (_pFinder)
|
||||||
|
{
|
||||||
::SendMessage(_hParent, NPPM_DMMSHOW, 0, (LPARAM)_pFinder->getHSelf());
|
::SendMessage(_hParent, NPPM_DMMSHOW, 0, (LPARAM)_pFinder->getHSelf());
|
||||||
_pFinder->_scintView.getFocus();
|
_pFinder->_scintView.getFocus();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void updateFinderScintilla() {
|
||||||
|
if (_pFinder && _pFinder->isCreated() && _pFinder->isVisible())
|
||||||
|
{
|
||||||
|
_pFinder->setFinderStyle();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
void addText2Combo(const TCHAR * txt2add, HWND comboID, bool isUTF8 = false);
|
void addText2Combo(const TCHAR * txt2add, HWND comboID, bool isUTF8 = false);
|
||||||
|
|
|
@ -217,10 +217,8 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
|
||||||
_isDirty = false;
|
_isDirty = false;
|
||||||
setVisualFromStyleList();
|
setVisualFromStyleList();
|
||||||
::SendMessage(_hParent, WM_UPDATESCINTILLAS, 0, 0);
|
::SendMessage(_hParent, WM_UPDATESCINTILLAS, 0, 0);
|
||||||
|
::SendMessage(_hParent, WM_UPDATEFINDERSCINTILLA, 0, 0);
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//::MessageBox(NULL, TEXT("no dirty"), TEXT(""), MB_OK);
|
|
||||||
//::EnableWindow(::GetDlgItem(_hSelf, IDOK), FALSE);
|
|
||||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_SAVECLOSE_BUTTON), !_isSync);
|
::EnableWindow(::GetDlgItem(_hSelf, IDC_SAVECLOSE_BUTTON), !_isSync);
|
||||||
display(false);
|
display(false);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -709,5 +707,17 @@ void WordStyleDlg::apply()
|
||||||
::EnableWindow(::GetDlgItem(_hSelf, IDOK), FALSE);
|
::EnableWindow(::GetDlgItem(_hSelf, IDOK), FALSE);
|
||||||
//_isDirty = false;
|
//_isDirty = false;
|
||||||
_isSync = false;
|
_isSync = false;
|
||||||
::SendMessage(_hParent, WM_UPDATESCINTILLAS, 0, 0);
|
|
||||||
|
TCHAR str[256] = TEXT("");
|
||||||
|
int i = ::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_GETCURSEL, 0, 0);
|
||||||
|
if (i == LB_ERR)
|
||||||
|
return;
|
||||||
|
::SendDlgItemMessage(_hSelf, IDC_LANGUAGES_LIST, LB_GETTEXT, i, (LPARAM)str);
|
||||||
|
|
||||||
|
int cmdid = 0;
|
||||||
|
if (lstrcmp(str, TEXT("Search result")) == 0)
|
||||||
|
cmdid = WM_UPDATEFINDERSCINTILLA;
|
||||||
|
else
|
||||||
|
cmdid = WM_UPDATESCINTILLAS;
|
||||||
|
::SendMessage(_hParent, cmdid, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define WM_UPDATESCINTILLAS (WORDSTYLE_USER + 1) //GlobalStyleDlg's msg 2 send 2 its parent
|
#define WM_UPDATESCINTILLAS (WORDSTYLE_USER + 1) //GlobalStyleDlg's msg 2 send 2 its parent
|
||||||
#define WM_DATA_MODIFIED (WORDSTYLE_USER + 2) //WordStyleDlg's msg 2 send 2 its parent(GlobalStyleDlg)
|
#define WM_UPDATEFINDERSCINTILLA (WORDSTYLE_USER + 2) //the msg 2 notify the finder's styles changed
|
||||||
|
|
||||||
enum fontStyleType {BOLD_STATUS, ITALIC_STATUS, UNDERLINE_STATUS};
|
enum fontStyleType {BOLD_STATUS, ITALIC_STATUS, UNDERLINE_STATUS};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue