Module: wine Branch: master Commit: 39c2ff0283204d6e714917a56f8538292ff62f51 URL: http://source.winehq.org/git/wine.git/?a=commit;h=39c2ff0283204d6e714917a56f...
Author: Zebediah Figura z.figura12@gmail.com Date: Thu Jul 20 23:43:15 2017 -0500
msi: Send the dialog created message in dialog_create().
It should be sent before the message loop, and it should also be sent for dialogs spawned with control events.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msi/dialog.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index a5b839d..c4a94f1 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -3918,6 +3918,8 @@ static BOOL dialog_register_class( void ) static msi_dialog *dialog_create( MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, control_event_handler event_handler ) { + static const WCHAR szDialogCreated[] = + {'D','i','a','l','o','g',' ','c','r','e','a','t','e','d',0}; MSIRECORD *rec = NULL; msi_dialog *dialog;
@@ -3949,6 +3951,13 @@ static msi_dialog *dialog_create( MSIPACKAGE *package, const WCHAR *name, msi_di dialog->control_cancel = strdupW( MSI_RecordGetString( rec, 10 ) ); msiobj_release( &rec->hdr );
+ rec = MSI_CreateRecord(2); + if (!rec) return NULL; + MSI_RecordSetStringW(rec, 1, name); + MSI_RecordSetStringW(rec, 2, szDialogCreated); + MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, rec); + msiobj_release(&rec->hdr); + return dialog; }
@@ -4603,17 +4612,6 @@ UINT ACTION_DialogBox( MSIPACKAGE *package, const WCHAR *dialog ) msi_free( name ); } if (r == ERROR_IO_PENDING) r = ERROR_SUCCESS; - if (r == ERROR_SUCCESS) - { - static const WCHAR szDialogCreated[] = - {'D','i','a','l','o','g',' ','c','r','e','a','t','e','d',0}; - MSIRECORD *row = MSI_CreateRecord(2); - if (!row) return ERROR_OUTOFMEMORY; - MSI_RecordSetStringW(row, 1, dialog); - MSI_RecordSetStringW(row, 2, szDialogCreated); - MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, row); - msiobj_release(&row->hdr); - } return r; }