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
6f9f6b1a
Commit
6f9f6b1a
authored
Jun 05, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Convert the control panel list to a standard list.
parent
c1e40a8b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
control.c
dlls/shell32/control.c
+13
-18
cpanel.h
dlls/shell32/cpanel.h
+4
-3
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+1
-1
No files found.
dlls/shell32/control.c
View file @
6f9f6b1a
...
...
@@ -45,10 +45,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shlctrl
);
CPlApplet
*
Control_UnloadApplet
(
CPlApplet
*
applet
)
void
Control_UnloadApplet
(
CPlApplet
*
applet
)
{
unsigned
i
;
CPlApplet
*
next
;
for
(
i
=
0
;
i
<
applet
->
count
;
i
++
)
{
if
(
!
applet
->
info
[
i
].
valid
)
continue
;
...
...
@@ -56,10 +55,9 @@ CPlApplet* Control_UnloadApplet(CPlApplet* applet)
}
if
(
applet
->
proc
)
applet
->
proc
(
applet
->
hWnd
,
CPL_EXIT
,
0L
,
0L
);
FreeLibrary
(
applet
->
hModule
);
next
=
applet
->
next
;
list_remove
(
&
applet
->
entry
)
;
HeapFree
(
GetProcessHeap
(),
0
,
applet
->
cmd
);
HeapFree
(
GetProcessHeap
(),
0
,
applet
);
return
next
;
}
CPlApplet
*
Control_LoadApplet
(
HWND
hWnd
,
LPCWSTR
cmd
,
CPanel
*
panel
)
...
...
@@ -168,9 +166,7 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
}
}
applet
->
next
=
panel
->
first
;
panel
->
first
=
applet
;
list_add_head
(
&
panel
->
applets
,
&
applet
->
entry
);
return
applet
;
theError:
...
...
@@ -278,7 +274,8 @@ static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs)
hSubMenu
=
GetSubMenu
(
hMenu
,
0
);
menucount
=
0
;
for
(
applet
=
panel
->
first
;
applet
;
applet
=
applet
->
next
)
{
LIST_FOR_EACH_ENTRY
(
applet
,
&
panel
->
applets
,
CPlApplet
,
entry
)
{
for
(
i
=
0
;
i
<
applet
->
count
;
i
++
)
{
if
(
!
applet
->
info
[
i
].
valid
)
continue
;
...
...
@@ -450,9 +447,9 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
return
0
;
case
WM_DESTROY
:
{
CPlApplet
*
applet
=
panel
->
firs
t
;
while
(
applet
)
applet
=
Control_UnloadApplet
(
applet
);
CPlApplet
*
applet
,
*
nex
t
;
LIST_FOR_EACH_ENTRY_SAFE
(
applet
,
next
,
&
panel
->
applets
,
CPlApplet
,
entry
)
Control_UnloadApplet
(
applet
);
}
Control_FreeCPlItems
(
hWnd
,
panel
);
PostQuitMessage
(
0
);
...
...
@@ -717,6 +714,7 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
LPWSTR
extraPmtsBuf
=
NULL
;
LPWSTR
extraPmts
=
NULL
;
int
quoted
=
0
;
CPlApplet
*
applet
;
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
wszCmd
)
+
1
)
*
sizeof
(
*
wszCmd
));
if
(
!
buffer
)
return
;
...
...
@@ -783,13 +781,9 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
TRACE
(
"cmd %s, extra %s, sp %d
\n
"
,
debugstr_w
(
buffer
),
debugstr_w
(
extraPmts
),
sp
);
Control_LoadApplet
(
hWnd
,
buffer
,
panel
);
if
(
panel
->
first
)
{
CPlApplet
*
applet
=
panel
->
first
;
assert
(
applet
&&
applet
->
next
==
NULL
);
applet
=
Control_LoadApplet
(
hWnd
,
buffer
,
panel
);
if
(
applet
)
{
/* we've been given a textual parameter (or none at all) */
if
(
sp
==
-
1
)
{
while
((
++
sp
)
!=
applet
->
count
)
{
...
...
@@ -830,6 +824,7 @@ void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdS
hWnd
,
hInst
,
debugstr_w
(
cmd
),
nCmdShow
);
memset
(
&
panel
,
0
,
sizeof
(
panel
));
list_init
(
&
panel
.
applets
);
if
(
!
cmd
||
!*
cmd
)
{
Control_DoWindow
(
&
panel
,
hWnd
,
hInst
);
...
...
dlls/shell32/cpanel.h
View file @
6f9f6b1a
...
...
@@ -21,6 +21,7 @@
#ifndef __WINE_SHELL_CPANEL_H
#define __WINE_SHELL_CPANEL_H
#include "wine/list.h"
#include "cpl.h"
struct
applet_info
...
...
@@ -34,7 +35,7 @@ struct applet_info
};
typedef
struct
CPlApplet
{
struct
CPlApplet
*
next
;
/* linked list */
struct
list
entry
;
HWND
hWnd
;
LPWSTR
cmd
;
/* path to applet */
unsigned
count
;
/* number of subprograms */
...
...
@@ -44,7 +45,7 @@ typedef struct CPlApplet {
}
CPlApplet
;
typedef
struct
CPanel
{
CPlApplet
*
first
;
struct
list
applets
;
HWND
hWnd
;
HINSTANCE
hInst
;
unsigned
total_subprogs
;
...
...
@@ -61,6 +62,6 @@ typedef struct CPlItem {
}
CPlItem
;
CPlApplet
*
Control_LoadApplet
(
HWND
hWnd
,
LPCWSTR
cmd
,
CPanel
*
panel
)
DECLSPEC_HIDDEN
;
CPlApplet
*
Control_UnloadApplet
(
CPlApplet
*
applet
)
DECLSPEC_HIDDEN
;
void
Control_UnloadApplet
(
CPlApplet
*
applet
)
DECLSPEC_HIDDEN
;
#endif
/* __WINE_SHELL_CPANEL_H */
dlls/shell32/cpanelfolder.c
View file @
6f9f6b1a
...
...
@@ -302,7 +302,7 @@ static BOOL SHELL_RegisterCPanelApp(IEnumIDListImpl *list, LPCSTR path)
MultiByteToWideChar
(
CP_ACP
,
0
,
path
,
-
1
,
wpath
,
MAX_PATH
);
panel
.
first
=
NULL
;
list_init
(
&
panel
.
applets
)
;
applet
=
Control_LoadApplet
(
0
,
wpath
,
&
panel
);
if
(
applet
)
...
...
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