msi [2/2]: Update the text control when the selection path changes
James Hawkins
truiken at gmail.com
Mon Dec 18 01:49:36 CST 2006
Hi,
This fixes bug 6874. http://bugs.winehq.org/show_bug.cgi?id=6874
Changelog:
* Update the text control when the selection path changes.
dlls/msi/dialog.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
--
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index e222dcb..389a471 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -614,6 +614,16 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
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_dialog *dialog, MSIRECORD *rec )
{
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_dialog *dialog, MSIRECORD *rec )
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_dialog *dialog, MSIRECORD *rec )
(LONG_PTR)MSIText_WndProc );
SetPropW( control->hwnd, szButtonData, info );
+ ControlEvent_SubscribeToEvent( dialog->package, dialog,
+ szSelectionPath, control->name, szSelectionPath );
+
return ERROR_SUCCESS;
}
--
1.4.4.2
More information about the wine-patches
mailing list