From c7876af9fc7c718e3b6a7142d8129d837211fc9c Mon Sep 17 00:00:00 2001 From: justin1014 Date: Sat, 21 Sep 2002 06:54:02 +0000 Subject: [PATCH] ok done for the night. smaller code yay. 248 bytes left to remove from code to bring bzip2 mode down tho :( git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1108 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 4d38817e..f1e21514 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1139,25 +1139,21 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if ((TVHT_ONITEMSTATEICON|TVHT_ONITEMLABEL|TVHT_ONITEMRIGHT|TVHT_ONITEM) & ht.flags) { TVITEM hItem; - int image,wh; hItem.hItem = ht.hItem; hItem.mask = TVIF_STATE|TVIF_PARAM; TreeView_GetItem(hwndTree1, &hItem); - image = hItem.state >> 12; - wh=hItem.lParam; - - if (!(g_inst_section[wh].default_state&DFS_RO)) + if (!(g_inst_section[hItem.lParam].default_state&DFS_RO)) { - if (image == 2) // already checked + if ((hItem.state >> 12) == 2) // already checked { - g_inst_section[wh].default_state&=~DFS_SET; + g_inst_section[hItem.lParam].default_state&=~DFS_SET; CheckTreeItem(hwndTree1,&hItem,0); } else { - g_inst_section[wh].default_state|=DFS_SET; + g_inst_section[hItem.lParam].default_state|=DFS_SET; CheckTreeItem(hwndTree1,&hItem,1); } #if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)