msi: Add initial implementation of the DirectoryListUp event.
This commit is contained in:
parent
a97962eef4
commit
a1b16d2d96
|
@ -1995,9 +1995,35 @@ static UINT msi_dialog_directory_combo( msi_dialog *dialog, MSIRECORD *rec )
|
||||||
|
|
||||||
/******************** Directory List ***************************************/
|
/******************** Directory List ***************************************/
|
||||||
|
|
||||||
|
UINT msi_dialog_directorylist_up( msi_dialog *dialog )
|
||||||
|
{
|
||||||
|
msi_control *control;
|
||||||
|
LPWSTR prop, path, ptr;
|
||||||
|
BOOL indirect;
|
||||||
|
|
||||||
|
control = msi_dialog_find_control( dialog, szDirectoryList );
|
||||||
|
indirect = control->attributes & msidbControlAttributesIndirect;
|
||||||
|
prop = msi_dialog_dup_property( dialog, control->property, indirect );
|
||||||
|
|
||||||
|
path = msi_dup_property( dialog->package, prop );
|
||||||
|
|
||||||
|
/* strip off the last directory */
|
||||||
|
ptr = PathFindFileNameW( path );
|
||||||
|
if (ptr != path) *(ptr - 1) = '\0';
|
||||||
|
PathAddBackslashW( path );
|
||||||
|
|
||||||
|
MSI_SetPropertyW( dialog->package, prop, path );
|
||||||
|
|
||||||
|
msi_free( path );
|
||||||
|
msi_free( prop );
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static UINT msi_dialog_directory_list( msi_dialog *dialog, MSIRECORD *rec )
|
static UINT msi_dialog_directory_list( msi_dialog *dialog, MSIRECORD *rec )
|
||||||
{
|
{
|
||||||
msi_control *control;
|
msi_control *control;
|
||||||
|
LPCWSTR prop;
|
||||||
DWORD style;
|
DWORD style;
|
||||||
|
|
||||||
style = LVS_LIST | LVS_EDITLABELS | WS_VSCROLL | LVS_SHAREIMAGELISTS |
|
style = LVS_LIST | LVS_EDITLABELS | WS_VSCROLL | LVS_SHAREIMAGELISTS |
|
||||||
|
@ -2007,6 +2033,10 @@ static UINT msi_dialog_directory_list( msi_dialog *dialog, MSIRECORD *rec )
|
||||||
if (!control)
|
if (!control)
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
|
||||||
|
control->attributes = MSI_RecordGetInteger( rec, 8 );
|
||||||
|
prop = MSI_RecordGetString( rec, 9 );
|
||||||
|
control->property = msi_dialog_dup_property( dialog, prop, FALSE );
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,12 @@ static UINT ControlEvent_SetInstallLevel(MSIPACKAGE* package, LPCWSTR argument,
|
||||||
return MSI_SetInstallLevel( package, iInstallLevel );
|
return MSI_SetInstallLevel( package, iInstallLevel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument,
|
||||||
|
msi_dialog *dialog)
|
||||||
|
{
|
||||||
|
return msi_dialog_directorylist_up( dialog );
|
||||||
|
}
|
||||||
|
|
||||||
static const struct _events Events[] = {
|
static const struct _events Events[] = {
|
||||||
{ "EndDialog",ControlEvent_EndDialog },
|
{ "EndDialog",ControlEvent_EndDialog },
|
||||||
{ "NewDialog",ControlEvent_NewDialog },
|
{ "NewDialog",ControlEvent_NewDialog },
|
||||||
|
@ -391,6 +397,7 @@ static const struct _events Events[] = {
|
||||||
{ "SetTargetPath",ControlEvent_SetTargetPath },
|
{ "SetTargetPath",ControlEvent_SetTargetPath },
|
||||||
{ "Reset",ControlEvent_Reset },
|
{ "Reset",ControlEvent_Reset },
|
||||||
{ "SetInstallLevel",ControlEvent_SetInstallLevel },
|
{ "SetInstallLevel",ControlEvent_SetInstallLevel },
|
||||||
|
{ "DirectoryListUp",ControlEvent_DirectoryListUp },
|
||||||
{ NULL,NULL },
|
{ NULL,NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -454,6 +454,7 @@ extern BOOL msi_dialog_register_class( void );
|
||||||
extern void msi_dialog_unregister_class( void );
|
extern void msi_dialog_unregister_class( void );
|
||||||
extern void msi_dialog_handle_event( msi_dialog*, LPCWSTR, LPCWSTR, MSIRECORD * );
|
extern void msi_dialog_handle_event( msi_dialog*, LPCWSTR, LPCWSTR, MSIRECORD * );
|
||||||
extern UINT msi_dialog_reset( msi_dialog *dialog );
|
extern UINT msi_dialog_reset( msi_dialog *dialog );
|
||||||
|
extern UINT msi_dialog_directorylist_up( msi_dialog *dialog );
|
||||||
|
|
||||||
/* preview */
|
/* preview */
|
||||||
extern MSIPREVIEW *MSI_EnableUIPreview( MSIDATABASE * );
|
extern MSIPREVIEW *MSI_EnableUIPreview( MSIDATABASE * );
|
||||||
|
|
Loading…
Reference in New Issue