src/Cedar/SW.c
// Update the installation directory setting screen

Update the installation directory setting screen
Update the installation directory setting screen
void SwDirUpdate(HWND hWnd, SW* sw, WIZARD_PAGE* wizard_page)
{
	bool user_mode_selected;
	bool show_custom;
	bool change_dir;
	if (hWnd == NULL || sw == NULL || wizard_page == NULL)
	{
		return;
	}
	change_dir = IsChecked(hWnd, R_CUSTOM);
	SetShow(hWnd, S_DEST, change_dir);
	SetShow(hWnd, E_DIR, change_dir);
	SetShow(hWnd, B_BROWSE, change_dir);
	show_custom = IsChecked(hWnd, R_SHOWCUSTOM);
	SetShow(hWnd, R_FOR_SYSTEM, show_custom);
	SetShow(hWnd, R_FOR_USER, show_custom);
	user_mode_selected = IsChecked(hWnd, R_FOR_USER);
	SetText(hWnd, R_DEFAULT, user_mode_selected ? sw->DefaultInstallDir_User : sw->DefaultInstallDir_System);
	if (user_mode_selected == false || sw->CurrentComponent->Id == SW_CMP_THIN_CLIENT)
	{
		Hide(hWnd, S_WARNING);
		Hide(hWnd, S_WARNING2);
	}
	else
	{
		SetShow(hWnd, S_WARNING, sw->ShowWarningForUserMode);
		SetShow(hWnd, S_WARNING2, sw->ShowWarningForUserMode);
	}
	SetEnable(hWnd, R_SHOWCUSTOM, !user_mode_selected);
	DlgFont(hWnd, R_DEFAULT, 0, !change_dir);
}
void SwDirUpdate ( HWND hWnd , SW * sw , WIZARD_PAGE * wizard_page ) { bool user_mode_selected ; bool show_custom ; bool change_dir ; if ( hWnd == NULL || sw == NULL || wizard_page == NULL ) { return ; } change_dir = IsChecked ( hWnd , R_CUSTOM ) ; SetShow ( hWnd , S_DEST , change_dir ) ; SetShow ( hWnd , E_DIR , change_dir ) ; SetShow ( hWnd , B_BROWSE , change_dir ) ; show_custom = IsChecked ( hWnd , R_SHOWCUSTOM ) ; SetShow ( hWnd , R_FOR_SYSTEM , show_custom ) ; SetShow ( hWnd , R_FOR_USER , show_custom ) ; user_mode_selected = IsChecked ( hWnd , R_FOR_USER ) ; SetText ( hWnd , R_DEFAULT , user_mode_selected ? sw -> DefaultInstallDir_User : sw -> DefaultInstallDir_System ) ; if ( user_mode_selected == false || sw -> CurrentComponent -> Id == SW_CMP_THIN_CLIENT ) { Hide ( hWnd , S_WARNING ) ; Hide ( hWnd , S_WARNING2 ) ; } else { SetShow ( hWnd , S_WARNING , sw -> ShowWarningForUserMode ) ; SetShow ( hWnd , S_WARNING2 , sw -> ShowWarningForUserMode ) ; } SetEnable ( hWnd , R_SHOWCUSTOM , ! user_mode_selected ) ; DlgFont ( hWnd , R_DEFAULT , 0 , ! change_dir ) ; }
Update the installation directory setting screen
Update the installation directory setting screen
// Validate arguments
