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
80878d00
Commit
80878d00
authored
Apr 19, 2010
by
Octavian Voicu
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Sync combo control value with associated property.
parent
857f9794
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
dialog.c
dlls/msi/dialog.c
+70
-0
No files found.
dlls/msi/dialog.c
View file @
80878d00
...
...
@@ -171,6 +171,8 @@ static MSIFEATURE *msi_seltree_get_selected_feature( msi_control *control );
static
DWORD
uiThreadId
;
static
HWND
hMsiHiddenWindow
;
static
LPWSTR
msi_get_window_text
(
HWND
hwnd
);
static
INT
msi_dialog_scale_unit
(
msi_dialog
*
dialog
,
INT
val
)
{
return
MulDiv
(
val
,
dialog
->
scale
,
12
);
...
...
@@ -1311,6 +1313,69 @@ static UINT msi_combobox_add_items( struct msi_combobox_info *info, LPCWSTR prop
return
r
;
}
static
UINT
msi_dialog_combobox_handler
(
msi_dialog
*
dialog
,
msi_control
*
control
,
WPARAM
param
)
{
struct
msi_combobox_info
*
info
;
int
index
;
LPWSTR
value
;
if
(
HIWORD
(
param
)
!=
CBN_SELCHANGE
&&
HIWORD
(
param
)
!=
CBN_EDITCHANGE
)
return
ERROR_SUCCESS
;
info
=
GetPropW
(
control
->
hwnd
,
szButtonData
);
index
=
SendMessageW
(
control
->
hwnd
,
CB_GETCURSEL
,
0
,
0
);
if
(
index
==
CB_ERR
)
value
=
msi_get_window_text
(
control
->
hwnd
);
else
value
=
(
LPWSTR
)
SendMessageW
(
control
->
hwnd
,
CB_GETITEMDATA
,
index
,
0
);
MSI_SetPropertyW
(
info
->
dialog
->
package
,
control
->
property
,
value
);
msi_dialog_evaluate_control_conditions
(
info
->
dialog
);
if
(
index
==
CB_ERR
)
msi_free
(
value
);
return
ERROR_SUCCESS
;
}
static
void
msi_dialog_combobox_update
(
msi_dialog
*
dialog
,
msi_control
*
control
)
{
struct
msi_combobox_info
*
info
;
LPWSTR
value
,
tmp
;
DWORD
j
;
info
=
GetPropW
(
control
->
hwnd
,
szButtonData
);
value
=
msi_dup_property
(
dialog
->
package
,
control
->
property
);
if
(
!
value
)
{
SendMessageW
(
control
->
hwnd
,
CB_SETCURSEL
,
-
1
,
0
);
return
;
}
for
(
j
=
0
;
j
<
info
->
num_items
;
j
++
)
{
tmp
=
(
LPWSTR
)
SendMessageW
(
control
->
hwnd
,
CB_GETITEMDATA
,
j
,
0
);
if
(
!
lstrcmpW
(
value
,
tmp
))
break
;
}
if
(
j
<
info
->
num_items
)
{
SendMessageW
(
control
->
hwnd
,
CB_SETCURSEL
,
j
,
0
);
}
else
{
SendMessageW
(
control
->
hwnd
,
CB_SETCURSEL
,
-
1
,
0
);
SetWindowTextW
(
control
->
hwnd
,
value
);
}
msi_free
(
value
);
}
static
UINT
msi_dialog_combo_control
(
msi_dialog
*
dialog
,
MSIRECORD
*
rec
)
{
struct
msi_combobox_info
*
info
;
...
...
@@ -1338,6 +1403,9 @@ static UINT msi_dialog_combo_control( msi_dialog *dialog, MSIRECORD *rec )
return
ERROR_FUNCTION_FAILED
;
}
control
->
handler
=
msi_dialog_combobox_handler
;
control
->
update
=
msi_dialog_combobox_update
;
prop
=
MSI_RecordGetString
(
rec
,
9
);
control
->
property
=
msi_dialog_dup_property
(
dialog
,
prop
,
FALSE
);
...
...
@@ -1353,6 +1421,8 @@ static UINT msi_dialog_combo_control( msi_dialog *dialog, MSIRECORD *rec )
if
(
control
->
property
)
msi_combobox_add_items
(
info
,
control
->
property
);
msi_dialog_combobox_update
(
dialog
,
control
);
return
ERROR_SUCCESS
;
}
...
...
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