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
4bb595e4
Commit
4bb595e4
authored
Aug 03, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Aug 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add a custom icon for the trash folder.
parent
76a20d38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
regsvr.c
dlls/shell32/regsvr.c
+22
-1
shres.rc
dlls/shell32/shres.rc
+2
-0
No files found.
dlls/shell32/regsvr.c
View file @
4bb595e4
...
...
@@ -73,6 +73,7 @@ struct regsvr_coclass
DWORD
dwCallForAttributes
;
LPCSTR
clsid_str
;
/* can be NULL to omit */
LPCSTR
progid
;
/* can be NULL to omit */
UINT
idDefaultIcon
;
/* can be 0 to omit */
};
/* flags for regsvr_coclass.flags */
...
...
@@ -127,6 +128,8 @@ static WCHAR const shellfolder_keyname[12] = {
static
WCHAR
const
mcdm_keyname
[
21
]
=
{
'M'
,
'a'
,
'y'
,
'C'
,
'h'
,
'a'
,
'n'
,
'g'
,
'e'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'M'
,
'e'
,
'n'
,
'u'
,
0
};
static
WCHAR
const
defaulticon_keyname
[]
=
{
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'I'
,
'c'
,
'o'
,
'n'
,
0
};
static
char
const
tmodel_valuename
[]
=
"ThreadingModel"
;
static
char
const
wfparsing_valuename
[]
=
"WantsFORPARSING"
;
static
char
const
attributes_valuename
[]
=
"Attributes"
;
...
...
@@ -275,6 +278,21 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list)
(
CONST
BYTE
*
)(
buffer
),
strlen
(
buffer
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
idDefaultIcon
)
{
HKEY
icon_key
;
char
buffer
[
64
]
=
"%SYSTEMROOT%
\\
system32
\\
shell32.dll,-"
;
res
=
RegCreateKeyExW
(
clsid_key
,
defaulticon_keyname
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
icon_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
sprintf
(
buffer
+
strlen
(
buffer
),
"%u"
,
list
->
idDefaultIcon
);
res
=
RegSetValueExA
(
icon_key
,
NULL
,
0
,
REG_EXPAND_SZ
,
(
CONST
BYTE
*
)(
buffer
),
strlen
(
buffer
)
+
1
);
RegCloseKey
(
icon_key
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
ips
)
{
res
=
register_key_defvalueA
(
clsid_key
,
ips_keyname
,
list
->
ips
);
...
...
@@ -668,7 +686,10 @@ static struct regsvr_coclass const coclass_list[] = {
"Apartment"
,
SHELLFOLDER_ATTRIBUTES
,
SFGAO_FOLDER
|
SFGAO_DROPTARGET
|
SFGAO_HASPROPSHEET
,
0
0
,
NULL
,
NULL
,
IDI_SHELL_FULL_RECYCLE_BIN
},
{
NULL
}
/* list terminator */
};
...
...
dlls/shell32/shres.rc
View file @
4bb595e4
...
...
@@ -10531,6 +10531,8 @@ IDI_SHELL_DESKTOP ICON desktop.ico
'FF FF FF FF FF FF'
} */
IDI_SHELL_FULL_RECYCLE_BIN ICON trash_file.ico
/* BINRES trash_file.ico */
IDI_SHELL_TRASH_FILE ICON trash_file.ico
/* {
...
...
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