diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 737ee16a..39e4eba3 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1049,7 +1049,11 @@ HTREEITEM NSISCALL TreeHitTest(HWND tree) 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)) +#endif return ht.hItem; return 0; @@ -1068,6 +1072,7 @@ static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l if (uMsg == WM_DESTROY) { last_item=-1; } +#ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE if (uMsg == WM_MOUSEMOVE) { TVITEM tvItem; @@ -1087,6 +1092,7 @@ static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l uMsg = WM_NOTIFY_SELCHANGE; } } +#endif if (uMsg == WM_NOTIFY_SELCHANGE) { if (last_item != lParam) { diff --git a/Source/exehead/config.h b/Source/exehead/config.h index e097a872..714dfc61 100644 --- a/Source/exehead/config.h +++ b/Source/exehead/config.h @@ -28,11 +28,19 @@ // present a license page. #define NSIS_CONFIG_LICENSEPAGE -// NSIS_CONFIG_LICENSEPAGE enables support for the installer to -// present a page.where you can select what sections are installed. +// NSIS_CONFIG_COMPONENTPAGE enables support for the installer to +// present a page where you can select what sections are installed. // with this disabled, all sections are installed. #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 // that are completely silent. #define NSIS_CONFIG_SILENT_SUPPORT