From 78c25b042a490dac1a1d3fc389ae14e01b3fd6f7 Mon Sep 17 00:00:00 2001 From: kichik Date: Mon, 2 Dec 2002 16:02:03 +0000 Subject: [PATCH] Some more improvments git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1867 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 71 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 94d983ad..28cdb8df 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1170,9 +1170,8 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar ht++; } SendMessage(hwndTree1,WM_VSCROLL,SB_TOP,0); - lParam = 0; } - else lParam = 1; + lParam = 1; uMsg = WM_IN_UPDATEMSG; } } @@ -1186,51 +1185,49 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar } if (uMsg == WM_IN_UPDATEMSG) { +#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE) + { + ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL); + } +#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE if (!lParam) { -#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE) + int r,x; + // check to see which install type we are + for (r = 0; r < m_num_insttypes; r ++) { - ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL); - } -#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE - { - int r,x; - // check to see which install type we are - for (r = 0; r < m_num_insttypes; r ++) + HTREEITEM *ht=hTreeItems; + section *t=g_inst_section; + x=num_sections; + while (x--) { - HTREEITEM *ht=hTreeItems; - section *t=g_inst_section; - x=num_sections; - while (x--) + if (t->name_ptr && !(t->flags&(SF_SUBSEC|SF_SUBSECEND))) { - if (t->name_ptr && !(t->flags&(SF_SUBSEC|SF_SUBSECEND))) + TV_ITEM hItem; + hItem.hItem=*ht; + if (g_inst_header->no_custom_instmode_flag==1) { - TV_ITEM hItem; - hItem.hItem=*ht; - if (g_inst_header->no_custom_instmode_flag==1) - { - CheckTreeItem(hwndTree1,&hItem,(t->install_types>>m_whichcfg)&1); - } - else if (!(t->flags&SF_RO)) - { - hItem.mask=TVIF_STATE; - TreeView_GetItem(hwndTree1,&hItem); - if (!(t->install_types&(1<>12)>1 )) break; - } + CheckTreeItem(hwndTree1,&hItem,(t->install_types>>m_whichcfg)&1); + } + else if (!(t->flags&SF_RO)) + { + hItem.mask=TVIF_STATE; + TreeView_GetItem(hwndTree1,&hItem); + if (!(t->install_types&(1<>12)>1 )) break; } - t++; - ht++; } - if (x < 0) break; + t++; + ht++; } + if (x < 0) break; + } - if (!g_inst_header->no_custom_instmode_flag) - { - SendMessage(hwndCombo1,CB_SETCURSEL,r,0); - m_whichcfg=r; - } - } // end of typecheckshit - } + if (!g_inst_header->no_custom_instmode_flag) + { + SendMessage(hwndCombo1,CB_SETCURSEL,r,0); + m_whichcfg=r; + } + } // end of typecheckshit if (g_inst_header->no_custom_instmode_flag==2) {