From 6b4b3c3f0898da55ebff3b8dc61b2567e8cd35a9 Mon Sep 17 00:00:00 2001 From: donho Date: Wed, 30 Apr 2008 20:20:29 +0000 Subject: [PATCH] [BUG_FIXED] Fix the stylers configurator transparency bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@193 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 4 +-- .../src/ScitillaComponent/FindReplaceDlg.cpp | 1 - .../src/ScitillaComponent/FindReplaceDlg_rc.h | 1 + .../WinControls/ColourPicker/WordStyleDlg.cpp | 26 ++++++++----------- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f75d096e1..064b139cb 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -6554,8 +6554,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa case WM_FINDINFILES : { - bool isRecursive = bool(lParam & FIND_RECURSIVE); - bool isInHiddenFolder = bool(lParam & FIND_INHIDDENDIR); + bool isRecursive = (lParam & FIND_RECURSIVE) != FALSE; + bool isInHiddenFolder = (lParam & FIND_INHIDDENDIR) != FALSE; findInFiles(isRecursive, isInHiddenFolder); return TRUE; } diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 2f54f6964..73fda41e8 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -401,7 +401,6 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP { if ((HWND)lParam == ::GetDlgItem(_hSelf, IDC_PERCENTAGE_SLIDER)) { - if (isCheckedOrNot(IDC_TRANSPARENT_ALWAYS_RADIO)) { int percent = ::SendDlgItemMessage(_hSelf, IDC_PERCENTAGE_SLIDER, TBM_GETPOS, 0, 0); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg_rc.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg_rc.h index 5dc6dfdbc..59fcb3925 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg_rc.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg_rc.h @@ -9,6 +9,7 @@ #define IDC_MODE_STATIC 1624 #define IDNORMAL 1625 #define IDEXTENDED 1626 + #define IDREGEXP 1605 #define IDWRAP 1606 diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp index 34bd2aa4b..226875659 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp @@ -153,6 +153,17 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar delete _pBgColour; 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 : { 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); display(false); 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 : { if (_isDirty)