Commit cbf7a1e8 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Set the Preselected property if the default feature selection is modified in a dialog.

parent 7a041d52
......@@ -163,58 +163,50 @@ static UINT ControlEvent_DoAction(MSIPACKAGE* package, LPCWSTR argument,
return ERROR_SUCCESS;
}
static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
msi_dialog* dialog)
static UINT ControlEvent_AddLocal( MSIPACKAGE *package, LPCWSTR argument, msi_dialog *dialog )
{
MSIFEATURE *feature = NULL;
MSIFEATURE *feature;
if (strcmpW( szAll, argument ))
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
MSI_SetFeatureStateW(package,argument,INSTALLSTATE_LOCAL);
}
else
{
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
msi_feature_set_state(package, feature, INSTALLSTATE_LOCAL);
ACTION_UpdateComponentStates(package,argument);
if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
{
if (feature->ActionRequest != INSTALLSTATE_LOCAL)
msi_set_property( package->db, szPreselected, szOne );
MSI_SetFeatureStateW( package, feature->Feature, INSTALLSTATE_LOCAL );
}
}
return ERROR_SUCCESS;
}
static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
msi_dialog* dialog)
static UINT ControlEvent_Remove( MSIPACKAGE *package, LPCWSTR argument, msi_dialog *dialog )
{
MSIFEATURE *feature = NULL;
MSIFEATURE *feature;
if (strcmpW( szAll, argument ))
{
MSI_SetFeatureStateW(package,argument,INSTALLSTATE_ABSENT);
}
else
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
msi_feature_set_state(package, feature, INSTALLSTATE_ABSENT);
ACTION_UpdateComponentStates(package,argument);
if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
{
if (feature->ActionRequest != INSTALLSTATE_ABSENT)
msi_set_property( package->db, szPreselected, szOne );
MSI_SetFeatureStateW( package, feature->Feature, INSTALLSTATE_ABSENT );
}
}
return ERROR_SUCCESS;
}
static UINT ControlEvent_AddSource(MSIPACKAGE* package, LPCWSTR argument,
msi_dialog* dialog)
static UINT ControlEvent_AddSource( MSIPACKAGE *package, LPCWSTR argument, msi_dialog *dialog )
{
MSIFEATURE *feature = NULL;
MSIFEATURE *feature;
if (strcmpW( szAll, argument ))
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
MSI_SetFeatureStateW(package,argument,INSTALLSTATE_SOURCE);
}
else
{
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
msi_feature_set_state(package, feature, INSTALLSTATE_SOURCE);
ACTION_UpdateComponentStates(package,argument);
if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
{
if (feature->ActionRequest != INSTALLSTATE_SOURCE)
msi_set_property( package->db, szPreselected, szOne );
MSI_SetFeatureStateW( package, feature->Feature, INSTALLSTATE_SOURCE );
}
}
return ERROR_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment