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
812e6047
Commit
812e6047
authored
Jul 14, 2009
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Enable/disable Modify button, and modify title on Remove button, as appropriate.
parent
2f541542
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
appwiz.c
dlls/appwiz.cpl/appwiz.c
+40
-3
No files found.
dlls/appwiz.cpl/appwiz.c
View file @
812e6047
...
...
@@ -73,6 +73,9 @@ typedef struct APPINFO {
static
struct
APPINFO
*
AppInfo
=
NULL
;
static
HINSTANCE
hInst
;
static
WCHAR
btnRemove
[
MAX_STRING_LEN
];
static
WCHAR
btnModifyRemove
[
MAX_STRING_LEN
];
static
const
WCHAR
openW
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
/* names of registry keys */
...
...
@@ -401,10 +404,42 @@ static inline void EmptyList(void)
*/
static
void
UpdateButtons
(
HWND
hWnd
)
{
BOOL
sel
=
SendMessageW
(
GetDlgItem
(
hWnd
,
IDL_PROGRAMS
),
LVM_GETSELECTEDCOUNT
,
0
,
0
)
!=
0
;
APPINFO
*
iter
;
LVITEMW
lvItem
;
DWORD
selitem
=
SendDlgItemMessageW
(
hWnd
,
IDL_PROGRAMS
,
LVM_GETNEXTITEM
,
-
1
,
LVNI_FOCUSED
|
LVNI_SELECTED
);
BOOL
enable_modify
=
FALSE
;
if
(
selitem
!=
-
1
)
{
lvItem
.
iItem
=
selitem
;
lvItem
.
mask
=
LVIF_PARAM
;
if
(
SendDlgItemMessageW
(
hWnd
,
IDL_PROGRAMS
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
lvItem
))
{
for
(
iter
=
AppInfo
;
iter
;
iter
=
iter
->
next
)
{
if
(
iter
->
id
==
lvItem
.
lParam
)
{
/* Decide whether to display Modify/Remove as one button or two */
enable_modify
=
(
iter
->
path_modify
!=
NULL
);
/* Update title as appropriate */
if
(
iter
->
path_modify
==
NULL
)
SetWindowTextW
(
GetDlgItem
(
hWnd
,
IDC_ADDREMOVE
),
btnModifyRemove
);
else
SetWindowTextW
(
GetDlgItem
(
hWnd
,
IDC_ADDREMOVE
),
btnRemove
);
break
;
}
}
}
}
EnableWindow
(
GetDlgItem
(
hWnd
,
IDC_ADDREMOVE
),
sel
);
EnableWindow
(
GetDlgItem
(
hWnd
,
IDC_SUPPORT_INFO
),
sel
);
/* Enable/disable other buttons if necessary */
EnableWindow
(
GetDlgItem
(
hWnd
,
IDC_ADDREMOVE
),
(
selitem
!=
-
1
));
EnableWindow
(
GetDlgItem
(
hWnd
,
IDC_SUPPORT_INFO
),
(
selitem
!=
-
1
));
EnableWindow
(
GetDlgItem
(
hWnd
,
IDC_MODIFY
),
enable_modify
);
}
/******************************************************************************
...
...
@@ -875,6 +910,8 @@ static void StartApplet(HWND hWnd)
/* Load the strings we will use */
LoadStringW
(
hInst
,
IDS_TAB1_TITLE
,
tab_title
,
sizeof
(
tab_title
)
/
sizeof
(
tab_title
[
0
]));
LoadStringW
(
hInst
,
IDS_CPL_TITLE
,
app_title
,
sizeof
(
app_title
)
/
sizeof
(
app_title
[
0
]));
LoadStringW
(
hInst
,
IDS_REMOVE
,
btnRemove
,
sizeof
(
btnRemove
)
/
sizeof
(
btnRemove
[
0
]));
LoadStringW
(
hInst
,
IDS_MODIFY_REMOVE
,
btnModifyRemove
,
sizeof
(
btnModifyRemove
)
/
sizeof
(
btnModifyRemove
[
0
]));
/* Fill out the PROPSHEETPAGE */
psp
.
dwSize
=
sizeof
(
PROPSHEETPAGEW
);
...
...
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