James Hawkins : msi: Use the handle to the treeview item if the item text is not returned.

Alexandre Julliard julliard at winehq.org
Mon May 5 07:14:55 CDT 2008


Module: wine
Branch: master
Commit: 6d91fd8ce622fb66440b92714275177a010c99bb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6d91fd8ce622fb66440b92714275177a010c99bb

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Sun May  4 02:06:37 2008 -0500

msi: Use the handle to the treeview item if the item text is not returned.

---

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

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 035d7f5..b83ae48 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -2055,7 +2055,8 @@ static UINT msi_dialog_seltree_handler( msi_dialog *dialog,
     LPNMTREEVIEWW tv = (LPNMTREEVIEWW)param;
     MSIRECORD *row, *rec;
     MSIFOLDER *folder;
-    LPCWSTR dir;
+    MSIFEATURE *feature;
+    LPCWSTR dir, title = NULL;
     UINT r = ERROR_SUCCESS;
 
     static const WCHAR select[] = {
@@ -2069,7 +2070,16 @@ static UINT msi_dialog_seltree_handler( msi_dialog *dialog,
 
     info->selected = tv->itemNew.hItem;
 
-    row = MSI_QueryGetRecord( dialog->package->db, select, tv->itemNew.pszText );
+    if (!(tv->itemNew.mask & TVIF_TEXT))
+    {
+        feature = msi_seltree_feature_from_item( control->hwnd, tv->itemNew.hItem );
+        if (feature)
+            title = feature->Title;
+    }
+    else
+        title = tv->itemNew.pszText;
+
+    row = MSI_QueryGetRecord( dialog->package->db, select, title );
     if (!row)
         return ERROR_FUNCTION_FAILED;
 




More information about the wine-cvs mailing list