[BUG_FIXED] Fix the stylers configurator transparency bug.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@193 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-04-30 20:20:29 +00:00
parent 2951979ef5
commit 6b4b3c3f08
4 changed files with 14 additions and 18 deletions

View File

@ -6554,8 +6554,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
case WM_FINDINFILES : case WM_FINDINFILES :
{ {
bool isRecursive = bool(lParam & FIND_RECURSIVE); bool isRecursive = (lParam & FIND_RECURSIVE) != FALSE;
bool isInHiddenFolder = bool(lParam & FIND_INHIDDENDIR); bool isInHiddenFolder = (lParam & FIND_INHIDDENDIR) != FALSE;
findInFiles(isRecursive, isInHiddenFolder); findInFiles(isRecursive, isInHiddenFolder);
return TRUE; return TRUE;
} }

View File

@ -401,7 +401,6 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
{ {
if ((HWND)lParam == ::GetDlgItem(_hSelf, IDC_PERCENTAGE_SLIDER)) if ((HWND)lParam == ::GetDlgItem(_hSelf, IDC_PERCENTAGE_SLIDER))
{ {
if (isCheckedOrNot(IDC_TRANSPARENT_ALWAYS_RADIO)) if (isCheckedOrNot(IDC_TRANSPARENT_ALWAYS_RADIO))
{ {
int percent = ::SendDlgItemMessage(_hSelf, IDC_PERCENTAGE_SLIDER, TBM_GETPOS, 0, 0); int percent = ::SendDlgItemMessage(_hSelf, IDC_PERCENTAGE_SLIDER, TBM_GETPOS, 0, 0);

View File

@ -9,6 +9,7 @@
#define IDC_MODE_STATIC 1624 #define IDC_MODE_STATIC 1624
#define IDNORMAL 1625 #define IDNORMAL 1625
#define IDEXTENDED 1626 #define IDEXTENDED 1626
#define IDREGEXP 1605 #define IDREGEXP 1605
#define IDWRAP 1606 #define IDWRAP 1606

View File

@ -153,6 +153,17 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
delete _pBgColour; delete _pBgColour;
return TRUE; return TRUE;
} }
case WM_HSCROLL :
{
if ((HWND)lParam == ::GetDlgItem(_hSelf, IDC_SC_PERCENTAGE_SLIDER))
{
int percent = ::SendDlgItemMessage(_hSelf, IDC_SC_PERCENTAGE_SLIDER, TBM_GETPOS, 0, 0);
(NppParameters::getInstance())->SetTransparent(_hSelf, percent);
}
return TRUE;
}
case WM_COMMAND : case WM_COMMAND :
{ {
if (HIWORD(wParam) == EN_CHANGE) if (HIWORD(wParam) == EN_CHANGE)
@ -215,22 +226,7 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
::EnableWindow(::GetDlgItem(_hSelf, IDC_SAVECLOSE_BUTTON), !_isSync); ::EnableWindow(::GetDlgItem(_hSelf, IDC_SAVECLOSE_BUTTON), !_isSync);
display(false); display(false);
return TRUE; return TRUE;
/*
case IDOK : //_isDirty == true;
{
LexerStylerArray & lsa = (NppParameters::getInstance())->getLStylerArray();
StyleArray & globalStyles = (NppParameters::getInstance())->getGlobalStylers();
lsa = _lsArray;
globalStyles = _globalStyles;
::EnableWindow(::GetDlgItem(_hSelf, IDOK), FALSE);
_isDirty = false;
_isSync = false;
::SendMessage(_hParent, WM_UPDATESCINTILLAS, 0, 0);
return TRUE;
}
*/
case IDC_SAVECLOSE_BUTTON : case IDC_SAVECLOSE_BUTTON :
{ {
if (_isDirty) if (_isDirty)