added NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3669 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-09-25 11:22:46 +00:00
parent e82748702c
commit 66ad756138
2 changed files with 16 additions and 2 deletions

View file

@ -1049,7 +1049,11 @@ HTREEITEM NSISCALL TreeHitTest(HWND tree)
TreeView_HitTest(tree, &ht); TreeView_HitTest(tree, &ht);
#ifdef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
if (ht.flags & TVHT_ONITEMSTATEICON)
#else
if (ht.flags & (TVHT_ONITEMSTATEICON|TVHT_ONITEMLABEL|TVHT_ONITEMRIGHT|TVHT_ONITEM)) if (ht.flags & (TVHT_ONITEMSTATEICON|TVHT_ONITEMLABEL|TVHT_ONITEMRIGHT|TVHT_ONITEM))
#endif
return ht.hItem; return ht.hItem;
return 0; return 0;
@ -1068,6 +1072,7 @@ static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
if (uMsg == WM_DESTROY) { if (uMsg == WM_DESTROY) {
last_item=-1; last_item=-1;
} }
#ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
if (uMsg == WM_MOUSEMOVE) { if (uMsg == WM_MOUSEMOVE) {
TVITEM tvItem; TVITEM tvItem;
@ -1087,6 +1092,7 @@ static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
uMsg = WM_NOTIFY_SELCHANGE; uMsg = WM_NOTIFY_SELCHANGE;
} }
} }
#endif
if (uMsg == WM_NOTIFY_SELCHANGE) { if (uMsg == WM_NOTIFY_SELCHANGE) {
if (last_item != lParam) if (last_item != lParam)
{ {

View file

@ -28,11 +28,19 @@
// present a license page. // present a license page.
#define NSIS_CONFIG_LICENSEPAGE #define NSIS_CONFIG_LICENSEPAGE
// NSIS_CONFIG_LICENSEPAGE enables support for the installer to // NSIS_CONFIG_COMPONENTPAGE enables support for the installer to
// present a page.where you can select what sections are installed. // present a page where you can select what sections are installed.
// with this disabled, all sections are installed. // with this disabled, all sections are installed.
#define NSIS_CONFIG_COMPONENTPAGE #define NSIS_CONFIG_COMPONENTPAGE
// NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE enables an alternative
// components page behavior. Checkboxes will only be toggled when
// clicking on the checkbox itself and not on its label.
// .onMouseOverSection will only be called when the user selects
// the component and not when moving the mouse pointer over it.
// NOT ENABLED BY DEFAULT.
// #define NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
// NSIS_CONFIG_SILENT_SUPPORT enables support for making installers // NSIS_CONFIG_SILENT_SUPPORT enables support for making installers
// that are completely silent. // that are completely silent.
#define NSIS_CONFIG_SILENT_SUPPORT #define NSIS_CONFIG_SILENT_SUPPORT