Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d1a916a6
Commit
d1a916a6
authored
Jan 05, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement recursive INSTALLSTATE updates for msi treeview selector.
parent
2f529c39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
9 deletions
+46
-9
dialog.c
dlls/msi/dialog.c
+46
-9
No files found.
dlls/msi/dialog.c
View file @
d1a916a6
...
...
@@ -166,6 +166,8 @@ static MSIFEATURE *msi_seltree_get_selected_feature( msi_control *control );
#define WM_MSI_DIALOG_CREATE (WM_USER+0x100)
#define WM_MSI_DIALOG_DESTROY (WM_USER+0x101)
#define USER_INSTALLSTATE_ALL 0x1000
static
DWORD
uiThreadId
;
static
HWND
hMsiHiddenWindow
;
...
...
@@ -1876,7 +1878,7 @@ msi_seltree_popup_menu( HWND hwnd, INT x, INT y )
/* FIXME: load strings from resources */
AppendMenuA
(
hMenu
,
MF_ENABLED
,
INSTALLSTATE_LOCAL
,
"Install feature locally"
);
AppendMenuA
(
hMenu
,
MF_
GRAYED
,
0x1000
,
"Install entire feature"
);
AppendMenuA
(
hMenu
,
MF_
ENABLED
,
USER_INSTALLSTATE_ALL
,
"Install entire feature"
);
AppendMenuA
(
hMenu
,
MF_ENABLED
,
INSTALLSTATE_ADVERTISED
,
"Install on demand"
);
AppendMenuA
(
hMenu
,
MF_ENABLED
,
INSTALLSTATE_ABSENT
,
"Don't install"
);
r
=
TrackPopupMenu
(
hMenu
,
TPM_LEFTALIGN
|
TPM_TOPALIGN
|
TPM_RETURNCMD
,
...
...
@@ -1899,6 +1901,37 @@ msi_seltree_feature_from_item( HWND hwnd, HTREEITEM hItem )
return
(
MSIFEATURE
*
)
tvi
.
lParam
;
}
static
void
msi_seltree_update_feature_installstate
(
HWND
hwnd
,
HTREEITEM
hItem
,
MSIPACKAGE
*
package
,
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
msi_feature_set_state
(
package
,
feature
,
state
);
msi_seltree_sync_item_state
(
hwnd
,
feature
,
hItem
);
ACTION_UpdateComponentStates
(
package
,
feature
->
Feature
);
}
static
void
msi_seltree_update_siblings_and_children_installstate
(
HWND
hwnd
,
HTREEITEM
curr
,
MSIPACKAGE
*
package
,
INSTALLSTATE
state
)
{
/* update all siblings */
do
{
MSIFEATURE
*
feature
;
HTREEITEM
child
;
feature
=
msi_seltree_feature_from_item
(
hwnd
,
curr
);
msi_seltree_update_feature_installstate
(
hwnd
,
curr
,
package
,
feature
,
state
);
/* update this sibling's children */
child
=
(
HTREEITEM
)
SendMessageW
(
hwnd
,
TVM_GETNEXTITEM
,
(
WPARAM
)
TVGN_CHILD
,
(
LPARAM
)
curr
);
if
(
child
)
msi_seltree_update_siblings_and_children_installstate
(
hwnd
,
child
,
package
,
state
);
}
while
((
curr
=
(
HTREEITEM
)
SendMessageW
(
hwnd
,
TVM_GETNEXTITEM
,
(
WPARAM
)
TVGN_NEXT
,
(
LPARAM
)
curr
)));
}
static
LRESULT
msi_seltree_menu
(
HWND
hwnd
,
HTREEITEM
hItem
)
{
...
...
@@ -1931,19 +1964,23 @@ msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
switch
(
r
)
{
case
INSTALLSTATE_LOCAL
:
case
USER_INSTALLSTATE_ALL
:
r
=
INSTALLSTATE_LOCAL
;
/* fall-through */
case
INSTALLSTATE_ADVERTISED
:
case
INSTALLSTATE_ABSENT
:
msi_feature_set_state
(
package
,
feature
,
r
);
{
HTREEITEM
child
;
child
=
(
HTREEITEM
)
SendMessageW
(
hwnd
,
TVM_GETNEXTITEM
,
(
WPARAM
)
TVGN_CHILD
,
(
LPARAM
)
hItem
);
if
(
child
)
msi_seltree_update_siblings_and_children_installstate
(
hwnd
,
child
,
package
,
r
);
}
/* fall-through */
case
INSTALLSTATE_LOCAL
:
msi_seltree_update_feature_installstate
(
hwnd
,
hItem
,
package
,
feature
,
r
);
break
;
default:
FIXME
(
"select feature and all children
\n
"
);
}
/* update */
msi_seltree_sync_item_state
(
hwnd
,
feature
,
hItem
);
ACTION_UpdateComponentStates
(
package
,
feature
->
Feature
);
return
0
;
}
...
...
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