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
7179b7d0
Commit
7179b7d0
authored
Nov 27, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Keep pending settings in static list.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7cba560a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
winecfg.c
programs/winecfg/winecfg.c
+9
-13
No files found.
programs/winecfg/winecfg.c
View file @
7179b7d0
...
...
@@ -221,7 +221,7 @@ struct setting
DWORD
type
;
/* type of registry value. REG_SZ or REG_DWORD for now */
};
st
ruct
list
*
settings
;
st
atic
struct
list
settings
=
LIST_INIT
(
settings
)
;
static
void
free_setting
(
struct
setting
*
setting
)
{
...
...
@@ -258,7 +258,7 @@ WCHAR *get_reg_keyW(HKEY root, const WCHAR *path, const WCHAR *name, const WCHAR
wine_dbgstr_w
(
name
),
wine_dbgstr_w
(
def
));
/* check if it's in the list */
LIST_FOR_EACH
(
cursor
,
settings
)
LIST_FOR_EACH
(
cursor
,
&
settings
)
{
s
=
LIST_ENTRY
(
cursor
,
struct
setting
,
entry
);
...
...
@@ -344,7 +344,7 @@ static void set_reg_key_ex(HKEY root, const WCHAR *path, const WCHAR *name, cons
wine_dbgstr_w
(
name
),
wine_dbgstr_w
(
value
));
/* firstly, see if we already set this setting */
LIST_FOR_EACH
(
cursor
,
settings
)
LIST_FOR_EACH
(
cursor
,
&
settings
)
{
struct
setting
*
s
=
LIST_ENTRY
(
cursor
,
struct
setting
,
entry
);
...
...
@@ -402,7 +402,7 @@ static void set_reg_key_ex(HKEY root, const WCHAR *path, const WCHAR *name, cons
break
;
}
list_add_tail
(
settings
,
&
s
->
entry
);
list_add_tail
(
&
settings
,
&
s
->
entry
);
}
void
set_reg_key
(
HKEY
root
,
const
char
*
path
,
const
char
*
name
,
const
char
*
value
)
...
...
@@ -487,7 +487,7 @@ static WCHAR **enumerate_valuesW(HKEY root, WCHAR *path)
WINE_TRACE
(
"name=%s
\n
"
,
wine_dbgstr_w
(
name
));
/* check if this value name has been removed in the settings list */
LIST_FOR_EACH
(
cursor
,
settings
)
LIST_FOR_EACH
(
cursor
,
&
settings
)
{
struct
setting
*
s
=
LIST_ENTRY
(
cursor
,
struct
setting
,
entry
);
if
(
lstrcmpiW
(
s
->
path
,
path
)
!=
0
)
continue
;
...
...
@@ -525,7 +525,7 @@ static WCHAR **enumerate_valuesW(HKEY root, WCHAR *path)
WINE_TRACE
(
"adding settings in list but not registry
\n
"
);
/* now we have to add the values that aren't in the registry but are in the settings list */
LIST_FOR_EACH
(
cursor
,
settings
)
LIST_FOR_EACH
(
cursor
,
&
settings
)
{
struct
setting
*
setting
=
LIST_ENTRY
(
cursor
,
struct
setting
,
entry
);
BOOL
found
=
FALSE
;
...
...
@@ -670,13 +670,13 @@ static void process_setting(struct setting *s)
void
apply
(
void
)
{
if
(
list_empty
(
settings
))
return
;
/* we will be called for each page when the user clicks OK */
if
(
list_empty
(
&
settings
))
return
;
/* we will be called for each page when the user clicks OK */
WINE_TRACE
(
"()
\n
"
);
while
(
!
list_empty
(
settings
))
while
(
!
list_empty
(
&
settings
))
{
struct
setting
*
s
=
(
struct
setting
*
)
list_head
(
settings
);
struct
setting
*
s
=
(
struct
setting
*
)
list_head
(
&
settings
);
process_setting
(
s
);
free_setting
(
s
);
}
...
...
@@ -758,9 +758,5 @@ BOOL initialize(HINSTANCE hInstance)
return
TRUE
;
}
/* we could probably just have the list as static data */
settings
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
list
));
list_init
(
settings
);
return
FALSE
;
}
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