msi: Use ACTION_UpdateComponentStates in the selection tree so we don't have to duplicate the component changing logic.
This commit is contained in:
parent
6518f3d7f2
commit
7a97b3ed84
|
@ -1700,8 +1700,9 @@ msi_seltree_feature_from_item( HWND hwnd, HTREEITEM hItem )
|
||||||
static LRESULT
|
static LRESULT
|
||||||
msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
|
msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
|
||||||
{
|
{
|
||||||
|
struct msi_selection_tree_info *info;
|
||||||
MSIFEATURE *feature;
|
MSIFEATURE *feature;
|
||||||
ComponentList *cl;
|
MSIPACKAGE *package;
|
||||||
union {
|
union {
|
||||||
RECT rc;
|
RECT rc;
|
||||||
POINT pt[2];
|
POINT pt[2];
|
||||||
|
@ -1709,6 +1710,9 @@ msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
|
||||||
} u;
|
} u;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
|
info = GetPropW(hwnd, szButtonData);
|
||||||
|
package = info->dialog->package;
|
||||||
|
|
||||||
feature = msi_seltree_feature_from_item( hwnd, hItem );
|
feature = msi_seltree_feature_from_item( hwnd, hItem );
|
||||||
if (!feature)
|
if (!feature)
|
||||||
{
|
{
|
||||||
|
@ -1737,13 +1741,7 @@ msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
|
||||||
|
|
||||||
/* update */
|
/* update */
|
||||||
msi_seltree_sync_item_state( hwnd, feature, hItem );
|
msi_seltree_sync_item_state( hwnd, feature, hItem );
|
||||||
|
ACTION_UpdateComponentStates( package, feature->Feature );
|
||||||
/* update the feature's components */
|
|
||||||
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
|
|
||||||
{
|
|
||||||
cl->component->Action = feature->Action;
|
|
||||||
cl->component->ActionRequest = feature->ActionRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue