git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2716 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
ramon18 2003-07-13 22:31:33 +00:00
parent a50e200dee
commit c846858de2

View file

@ -982,6 +982,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
HWND hwndCombo1 = GetUIItem(IDC_COMBO1); HWND hwndCombo1 = GetUIItem(IDC_COMBO1);
HWND hwndTree1 = GetUIItem(IDC_TREE1); HWND hwndTree1 = GetUIItem(IDC_TREE1);
extern HWND g_SectionHack; extern HWND g_SectionHack;
BYTE bSelChanged=0;
if (uMsg == WM_INITDIALOG) if (uMsg == WM_INITDIALOG)
{ {
int doLines=0; int doLines=0;
@ -1166,9 +1167,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
lParam = 0; lParam = 0;
uMsg = WM_IN_UPDATEMSG; uMsg = WM_IN_UPDATEMSG;
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE) bSelChanged=1;
ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL);
#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE
} // not ro } // not ro
} // was valid click } // was valid click
} // was click or hack } // was click or hack
@ -1196,10 +1195,11 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (uMsg == WM_NOTIFY_INSTTYPE_CHANGE || if (uMsg == WM_NOTIFY_INSTTYPE_CHANGE ||
(uMsg == WM_COMMAND && LOWORD(wParam)==IDC_COMBO1 && HIWORD(wParam)==CBN_SELCHANGE)) (uMsg == WM_COMMAND && LOWORD(wParam)==IDC_COMBO1 && HIWORD(wParam)==CBN_SELCHANGE))
{ {
int t=SendMessage(hwndCombo1,CB_GETCURSEL,0,0); int t=SendMessage(hwndCombo1,CB_GETCURSEL,0,0);
if (uMsg == WM_NOTIFY_INSTTYPE_CHANGE || t != CB_ERR) if (uMsg == WM_NOTIFY_INSTTYPE_CHANGE || t != CB_ERR)
{ {
int whichcfg=SendMessage(hwndCombo1,CB_GETITEMDATA,t,0); int whichcfg=SendMessage(hwndCombo1,CB_GETITEMDATA,t,0);
bSelChanged = uMsg == uMsg != WM_NOTIFY_INSTTYPE_CHANGE;
if (uMsg == WM_NOTIFY_INSTTYPE_CHANGE) if (uMsg == WM_NOTIFY_INSTTYPE_CHANGE)
{ {
whichcfg = g_flags.cur_insttype; whichcfg = g_flags.cur_insttype;
@ -1308,6 +1308,12 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SetUITextNT(IDC_SPACEREQUIRED,inttosizestr(total,mystrcpy(s,LANG_STR(LANG_SPACE_REQ)))); SetUITextNT(IDC_SPACEREQUIRED,inttosizestr(total,mystrcpy(s,LANG_STR(LANG_SPACE_REQ))));
} }
} }
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)
if ( bSelChanged )
ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL);
#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE
return HandleStaticBkColor(); return HandleStaticBkColor();
} }
#endif//NSIS_CONFIG_COMPONENTPAGE #endif//NSIS_CONFIG_COMPONENTPAGE