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
34299c76
Commit
34299c76
authored
May 04, 2005
by
James Hawkins
Committed by
Alexandre Julliard
May 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add the same program in AppDefaults more than once.
parent
64dcb35a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
appdefaults.c
programs/winecfg/appdefaults.c
+14
-0
No files found.
programs/winecfg/appdefaults.c
View file @
34299c76
...
...
@@ -256,6 +256,16 @@ static void on_selection_change(HWND dialog, HWND listview)
set_window_title
(
dialog
);
}
static
BOOL
list_contains_file
(
HWND
listview
,
char
*
filename
)
{
LVFINDINFO
find_info
=
{
LVFI_STRING
,
filename
,
0
,
{
0
,
0
},
0
};
int
index
;
index
=
ListView_FindItem
(
listview
,
-
1
,
&
find_info
);
return
(
index
!=
-
1
);
}
static
void
on_add_app_click
(
HWND
dialog
)
{
char
filetitle
[
MAX_PATH
];
...
...
@@ -280,6 +290,10 @@ static void on_add_app_click(HWND dialog)
char
*
new_app
;
new_app
=
strdupA
(
filetitle
);
if
(
list_contains_file
(
listview
,
new_app
))
return
;
WINE_TRACE
(
"adding %s
\n
"
,
new_app
);
add_listview_item
(
listview
,
new_app
,
new_app
);
...
...
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