msi: Use ACTION_UpdateComponentStates in the selection tree so we don't have to duplicate the component changing logic.

This commit is contained in:
James Hawkins 2006-09-15 17:13:10 -07:00 committed by Alexandre Julliard
parent 6518f3d7f2
commit 7a97b3ed84
1 changed files with 6 additions and 8 deletions

View File

@ -1700,8 +1700,9 @@ msi_seltree_feature_from_item( HWND hwnd, HTREEITEM hItem )
static LRESULT
msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
{
struct msi_selection_tree_info *info;
MSIFEATURE *feature;
ComponentList *cl;
MSIPACKAGE *package;
union {
RECT rc;
POINT pt[2];
@ -1709,6 +1710,9 @@ msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
} u;
UINT r;
info = GetPropW(hwnd, szButtonData);
package = info->dialog->package;
feature = msi_seltree_feature_from_item( hwnd, hItem );
if (!feature)
{
@ -1737,13 +1741,7 @@ msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
/* update */
msi_seltree_sync_item_state( hwnd, feature, hItem );
/* update the feature's components */
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
{
cl->component->Action = feature->Action;
cl->component->ActionRequest = feature->ActionRequest;
}
ACTION_UpdateComponentStates( package, feature->Feature );
return 0;
}