msi: Translate the INSTALLSTATE_UNKNOWN index into the INSTALLSTATE_ABSENT image index.

This commit is contained in:
James Hawkins 2006-09-20 19:58:06 -07:00 committed by Alexandre Julliard
parent 32f570222b
commit 703d77dc58

View File

@ -1651,13 +1651,17 @@ static void
msi_seltree_sync_item_state( HWND hwnd, MSIFEATURE *feature, HTREEITEM hItem )
{
TVITEMW tvi;
DWORD index = feature->Action;
TRACE("Feature %s -> %d %d %d\n", debugstr_w(feature->Title),
feature->Installed, feature->Action, feature->ActionRequest);
if (index == INSTALLSTATE_UNKNOWN)
index = INSTALLSTATE_ABSENT;
tvi.mask = TVIF_STATE;
tvi.hItem = hItem;
tvi.state = INDEXTOSTATEIMAGEMASK( feature->Action );
tvi.state = INDEXTOSTATEIMAGEMASK( index );
tvi.stateMask = TVIS_STATEIMAGEMASK;
SendMessageW( hwnd, TVM_SETITEMW, 0, (LPARAM) &tvi );