From 349dc153b1c5b2a3d7a4e0e9b3c43a0cf9df10b2 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 26 Sep 2002 18:41:00 +0000 Subject: [PATCH] Section check marks are now changeable in .onNextPage/.onPrevPage after/before the components page. Code size is down by 12 bytes because of this :) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1195 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 3427ec2b..3248e212 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -950,12 +950,16 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar static HIMAGELIST hImageList; HWND hwndCombo1 = GetUIItem(IDC_COMBO1); HWND hwndTree1 = GetUIItem(IDC_TREE1); + extern HWND g_SectionHack; if (uMsg == WM_INITDIALOG) { int doLines=0; HTREEITEM Par; HBITMAP hBMcheck1; int x; + + g_SectionHack=hwndDlg; + if (hTreeItems) GlobalFree(hTreeItems); hTreeItems=(HTREEITEM*)my_GlobalAlloc(sizeof(HTREEITEM)*num_sections); @@ -1132,10 +1136,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar } #if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE) { - extern HWND g_SectionHack; - g_SectionHack=hwndDlg; ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL); - g_SectionHack=0; } #endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE { @@ -1241,6 +1242,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (hImageList) ImageList_Destroy(hImageList); if (hTreeItems) GlobalFree(hTreeItems); hTreeItems=0; + g_SectionHack=0; } if (uMsg == WM_IN_UPDATEMSG) {