James Hawkins : msi: Notify the external UI handler when changing
media.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 14 05:14:14 CST 2006
Module: wine
Branch: master
Commit: 31a9b087c15b7798d7c5b7766f151522add47028
URL: http://source.winehq.org/git/wine.git/?a=commit;h=31a9b087c15b7798d7c5b7766f151522add47028
Author: James Hawkins <truiken at gmail.com>
Date: Mon Nov 13 14:18:54 2006 -0800
msi: Notify the external UI handler when changing media.
---
dlls/msi/dialog.c | 4 ++++
dlls/msi/files.c | 12 +++++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index d928edc..a134aea 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -3505,6 +3505,7 @@ UINT msi_spawn_error_dialog( MSIPACKAGE
DWORD size = MAX_PATH;
int res;
+ static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
static const WCHAR pn_prop[] = {'P','r','o','d','u','c','t','N','a','m','e',0};
static const WCHAR title_fmt[] = {'%','s',' ','W','a','r','n','i','n','g',0};
static const WCHAR error_abort[] = {'E','r','r','o','r','A','b','o','r','t',0};
@@ -3512,6 +3513,9 @@ UINT msi_spawn_error_dialog( MSIPACKAGE
'M','S','I','E','r','r','o','r','D','i','a','l','o','g','R','e','s','u','l','t',0
};
+ if ( msi_get_property_int(package, szUILevel, 0) == INSTALLUILEVEL_NONE )
+ return ERROR_SUCCESS;
+
if ( !error_dialog )
{
LPWSTR product_name = msi_dup_property( package, pn_prop );
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index dc81e6a..8d3992e 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -69,21 +69,31 @@ struct media_info {
static UINT msi_change_media( MSIPACKAGE *package, struct media_info *mi )
{
+ LPSTR msg;
LPWSTR error, error_dialog;
UINT r = ERROR_SUCCESS;
static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
static const WCHAR error_prop[] = {'E','r','r','o','r','D','i','a','l','o','g',0};
- if ( msi_get_property_int(package, szUILevel, 0) == INSTALLUILEVEL_NONE )
+ if ( msi_get_property_int(package, szUILevel, 0) == INSTALLUILEVEL_NONE && !gUIHandlerA )
return ERROR_SUCCESS;
error = generate_error_string( package, 1302, 1, mi->disk_prompt );
error_dialog = msi_dup_property( package, error_prop );
while ( r == ERROR_SUCCESS && GetFileAttributesW( mi->source ) == INVALID_FILE_ATTRIBUTES )
+ {
r = msi_spawn_error_dialog( package, error_dialog, error );
+ if (gUIHandlerA)
+ {
+ msg = strdupWtoA( error );
+ gUIHandlerA( gUIContext, MB_RETRYCANCEL | INSTALLMESSAGE_ERROR, msg );
+ msi_free(msg);
+ }
+ }
+
msi_free( error );
msi_free( error_dialog );
More information about the wine-cvs
mailing list