Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3d812659
Commit
3d812659
authored
Sep 28, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Sep 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Return to the parent dialog when the argument to the EndDialog event is Return.
parent
29ce6b37
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
dialog.c
dlls/msi/dialog.c
+14
-1
events.c
dlls/msi/events.c
+10
-5
msipriv.h
dlls/msi/msipriv.h
+3
-1
preview.c
dlls/msi/preview.c
+1
-1
No files found.
dlls/msi/dialog.c
View file @
3d812659
...
...
@@ -82,6 +82,7 @@ typedef struct msi_font_tag
struct
msi_dialog_tag
{
MSIPACKAGE
*
package
;
msi_dialog
*
parent
;
msi_dialog_event_handler
event_handler
;
BOOL
finished
;
INT
scale
;
...
...
@@ -222,6 +223,16 @@ static LPWSTR msi_dialog_dup_property( msi_dialog *dialog, LPCWSTR property, BOO
return
strdupW
(
property
);
}
msi_dialog
*
msi_dialog_get_parent
(
msi_dialog
*
dialog
)
{
return
dialog
->
parent
;
}
LPWSTR
msi_dialog_get_name
(
msi_dialog
*
dialog
)
{
return
dialog
->
name
;
}
/*
* msi_dialog_get_style
*
...
...
@@ -3060,7 +3071,8 @@ static LRESULT WINAPI MSIHiddenWindowProc( HWND hwnd, UINT msg,
/* functions that interface to other modules within MSI */
msi_dialog
*
msi_dialog_create
(
MSIPACKAGE
*
package
,
LPCWSTR
szDialogName
,
msi_dialog
*
msi_dialog_create
(
MSIPACKAGE
*
package
,
LPCWSTR
szDialogName
,
msi_dialog
*
parent
,
msi_dialog_event_handler
event_handler
)
{
MSIRECORD
*
rec
=
NULL
;
...
...
@@ -3073,6 +3085,7 @@ msi_dialog *msi_dialog_create( MSIPACKAGE* package, LPCWSTR szDialogName,
if
(
!
dialog
)
return
NULL
;
strcpyW
(
dialog
->
name
,
szDialogName
);
dialog
->
parent
=
parent
;
msiobj_addref
(
&
package
->
hdr
);
dialog
->
package
=
package
;
dialog
->
event_handler
=
event_handler
;
...
...
dlls/msi/events.c
View file @
3d812659
...
...
@@ -58,13 +58,13 @@ UINT ControlEvent_HandleControlEvent(MSIPACKAGE *, LPCWSTR, LPCWSTR, msi_dialog*
/*
* Create a dialog box and run it if it's modal
*/
static
UINT
event_do_dialog
(
MSIPACKAGE
*
package
,
LPCWSTR
name
,
BOOL
destroy_modeless
)
static
UINT
event_do_dialog
(
MSIPACKAGE
*
package
,
LPCWSTR
name
,
msi_dialog
*
parent
,
BOOL
destroy_modeless
)
{
msi_dialog
*
dialog
;
UINT
r
;
/* create a new dialog */
dialog
=
msi_dialog_create
(
package
,
name
,
dialog
=
msi_dialog_create
(
package
,
name
,
parent
,
ControlEvent_HandleControlEvent
);
if
(
dialog
)
{
...
...
@@ -111,7 +111,12 @@ static UINT ControlEvent_EndDialog(MSIPACKAGE* package, LPCWSTR argument,
else
if
(
lstrcmpW
(
argument
,
szIgnore
)
==
0
)
package
->
CurrentInstallState
=
-
1
;
else
if
(
lstrcmpW
(
argument
,
szReturn
)
==
0
)
{
msi_dialog
*
parent
=
msi_dialog_get_parent
(
dialog
);
msi_free
(
package
->
next_dialog
);
package
->
next_dialog
=
(
parent
)
?
strdupW
(
msi_dialog_get_name
(
parent
))
:
NULL
;
package
->
CurrentInstallState
=
ERROR_SUCCESS
;
}
else
{
ERR
(
"Unknown argument string %s
\n
"
,
debugstr_w
(
argument
));
...
...
@@ -143,7 +148,7 @@ static UINT ControlEvent_SpawnDialog(MSIPACKAGE* package, LPCWSTR argument,
msi_dialog
*
dialog
)
{
/* don't destroy a modeless dialogs that might be our parent */
event_do_dialog
(
package
,
argument
,
FALSE
);
event_do_dialog
(
package
,
argument
,
dialog
,
FALSE
);
if
(
package
->
CurrentInstallState
!=
ERROR_SUCCESS
)
msi_dialog_end_dialog
(
dialog
);
return
ERROR_SUCCESS
;
...
...
@@ -353,13 +358,13 @@ UINT ACTION_DialogBox( MSIPACKAGE* package, LPCWSTR szDialogName )
* dialog, as it returns ERROR_IO_PENDING when we try to run
* its message loop.
*/
r
=
event_do_dialog
(
package
,
szDialogName
,
TRUE
);
r
=
event_do_dialog
(
package
,
szDialogName
,
NULL
,
TRUE
);
while
(
r
==
ERROR_SUCCESS
&&
package
->
next_dialog
)
{
LPWSTR
name
=
package
->
next_dialog
;
package
->
next_dialog
=
NULL
;
r
=
event_do_dialog
(
package
,
name
,
TRUE
);
r
=
event_do_dialog
(
package
,
name
,
NULL
,
TRUE
);
msi_free
(
name
);
}
...
...
dlls/msi/msipriv.h
View file @
3d812659
...
...
@@ -451,7 +451,7 @@ extern LONG msi_reg_set_subkey_val( HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWS
/* msi dialog interface */
typedef
UINT
(
*
msi_dialog_event_handler
)(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
,
msi_dialog
*
);
extern
msi_dialog
*
msi_dialog_create
(
MSIPACKAGE
*
,
LPCWSTR
,
msi_dialog_event_handler
);
extern
msi_dialog
*
msi_dialog_create
(
MSIPACKAGE
*
,
LPCWSTR
,
msi_dialog
*
,
msi_dialog
_event_handler
);
extern
UINT
msi_dialog_run_message_loop
(
msi_dialog
*
);
extern
void
msi_dialog_end_dialog
(
msi_dialog
*
);
extern
void
msi_dialog_check_messages
(
HANDLE
);
...
...
@@ -462,6 +462,8 @@ extern void msi_dialog_unregister_class( void );
extern
void
msi_dialog_handle_event
(
msi_dialog
*
,
LPCWSTR
,
LPCWSTR
,
MSIRECORD
*
);
extern
UINT
msi_dialog_reset
(
msi_dialog
*
dialog
);
extern
UINT
msi_dialog_directorylist_up
(
msi_dialog
*
dialog
);
extern
msi_dialog
*
msi_dialog_get_parent
(
msi_dialog
*
dialog
);
extern
LPWSTR
msi_dialog_get_name
(
msi_dialog
*
dialog
);
/* preview */
extern
MSIPREVIEW
*
MSI_EnableUIPreview
(
MSIDATABASE
*
);
...
...
dlls/msi/preview.c
View file @
3d812659
...
...
@@ -103,7 +103,7 @@ UINT MSI_PreviewDialogW( MSIPREVIEW *preview, LPCWSTR szDialogName )
/* an empty name means we should just destroy the current preview dialog */
if
(
szDialogName
)
{
dialog
=
msi_dialog_create
(
preview
->
package
,
szDialogName
,
dialog
=
msi_dialog_create
(
preview
->
package
,
szDialogName
,
NULL
,
preview_event_handler
);
if
(
dialog
)
msi_dialog_do_preview
(
dialog
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment