msi: Update the text control when the selection path changes.
This commit is contained in:
parent
6f3f2549c1
commit
fdfb10e02b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue