msi [3/3]: Use ACTION_UpdateComponentStates in the selection tree so we don't have to duplicate the component changing logic

James Hawkins truiken at gmail.com
Fri Sep 15 19:13:10 CDT 2006


Hi,

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

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

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 0b63966..035224b 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -1700,8 +1700,9 @@ msi_seltree_feature_from_item( HWND hwnd
 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 h
     } 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 h
 
     /* 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;
 }
-- 
1.4.2


More information about the wine-patches mailing list