msi [6/7]: Translate the INSTALLSTATE_UNKNOWN index into the INSTALLSTATE_ABSENT image index

James Hawkins truiken at gmail.com
Wed Sep 20 21:58:06 CDT 2006


Hi,

This fixes the selection tree control to display the 'X' unselected features.

Changelog:
* Translate the INSTALLSTATE_UNKNOWN index into the
INSTALLSTATE_ABSENT image index.

 dlls/msi/dialog.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 1f15f40..45029c9 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -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),
+    printf("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 );
-- 
1.4.2.1


More information about the wine-patches mailing list