James Hawkins : msi: Update the text control when the selection path changes.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 18 05:34:37 CST 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Mon Dec 18 01:49:36 2006 -0600

msi: Update the text control when the selection path changes.

---

 dlls/msi/dialog.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index e222dcb..739fcd5 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -614,6 +614,16 @@ void msi_dialog_handle_event( msi_dialog
         MSIFEATURE *feature = msi_seltree_get_selected_feature( ctrl );
         MSI_SetPropertyW( dialog->package, ctrl->property, feature->Directory );
     }
+    else if ( !lstrcmpW(attribute, szSelectionPath) )
+    {
+        LPWSTR prop = msi_dialog_dup_property( dialog, ctrl->property, TRUE );
+        LPWSTR path;
+        if (!prop) return;
+        path = msi_dup_property( dialog->package, prop );
+        SetWindowTextW( ctrl->hwnd, path );
+        msi_free(prop);
+        msi_free(path);
+    }
     else
     {
         FIXME("Attribute %s not being set\n", debugstr_w(attribute));
@@ -730,7 +740,7 @@ static UINT msi_dialog_text_control( msi
 {
     msi_control *control;
     struct msi_text_info *info;
-    LPCWSTR text, ptr;
+    LPCWSTR text, ptr, prop;
     LPWSTR font_name;
 
     TRACE("%p %p\n", dialog, rec);
@@ -743,6 +753,10 @@ static UINT msi_dialog_text_control( msi
     if( !info )
         return ERROR_SUCCESS;
 
+    control->attributes = MSI_RecordGetInteger( rec, 8 );
+    prop = MSI_RecordGetString( rec, 9 );
+    control->property = msi_dialog_dup_property( dialog, prop, FALSE );
+
     text = MSI_RecordGetString( rec, 10 );
     font_name = msi_dialog_get_style( text, &ptr );
     info->font = ( font_name ) ? msi_dialog_find_font( dialog, font_name ) : NULL;
@@ -756,6 +770,9 @@ static UINT msi_dialog_text_control( msi
                                           (LONG_PTR)MSIText_WndProc );
     SetPropW( control->hwnd, szButtonData, info );
 
+    ControlEvent_SubscribeToEvent( dialog->package, dialog,
+                                   szSelectionPath, control->name, szSelectionPath );
+
     return ERROR_SUCCESS;
 }
 




More information about the wine-cvs mailing list