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
b0b47774
Commit
b0b47774
authored
Aug 26, 2005
by
Michael Jung
Committed by
Alexandre Julliard
Aug 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented 'My Documents' folder.
parent
93ab695a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
17 deletions
+72
-17
.cvsignore
dlls/shell32/.cvsignore
+1
-0
Makefile.in
dlls/shell32/Makefile.in
+1
-0
folders.c
dlls/shell32/folders.c
+1
-1
iconcache.c
dlls/shell32/iconcache.c
+1
-1
regsvr.c
dlls/shell32/regsvr.c
+15
-0
shell32_main.h
dlls/shell32/shell32_main.h
+1
-0
shellole.c
dlls/shell32/shellole.c
+1
-0
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+26
-15
shres.rc
dlls/shell32/shres.rc
+24
-0
shresdef.h
dlls/shell32/shresdef.h
+1
-0
No files found.
dlls/shell32/.cvsignore
View file @
b0b47774
...
...
@@ -9,6 +9,7 @@ folder.ico
folder_open.ico
libshell32.def
mycomputer.ico
mydocs.ico
netdrive.ico
netdrive2.ico
printer.ico
...
...
dlls/shell32/Makefile.in
View file @
b0b47774
...
...
@@ -61,6 +61,7 @@ RC_BINARIES = \
folder.ico
\
folder_open.ico
\
mycomputer.ico
\
mydocs.ico
\
netdrive.ico
\
netdrive2.ico
\
printer.ico
\
...
...
dlls/shell32/folders.c
View file @
b0b47774
...
...
@@ -266,7 +266,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
if
(
IsEqualGUID
(
riid
,
&
CLSID_MyComputer
))
*
piIndex
=
-
IDI_SHELL_MY_COMPUTER
;
else
if
(
IsEqualGUID
(
riid
,
&
CLSID_MyDocuments
))
*
piIndex
=
-
IDI_SHELL_
FOLDER
;
*
piIndex
=
-
IDI_SHELL_
MY_DOCUMENTS
;
else
if
(
IsEqualGUID
(
riid
,
&
CLSID_NetworkPlaces
))
*
piIndex
=
-
IDI_SHELL_MY_NETWORK_PLACES
;
else
if
(
IsEqualGUID
(
riid
,
&
CLSID_UnixFolder
)
||
...
...
dlls/shell32/iconcache.c
View file @
b0b47774
...
...
@@ -399,7 +399,7 @@ BOOL SIC_Initialize(void)
ImageList_SetBkColor
(
ShellSmallIconList
,
CLR_NONE
);
ImageList_SetBkColor
(
ShellBigIconList
,
CLR_NONE
);
for
(
index
=
1
;
index
<
39
;
index
++
)
for
(
index
=
1
;
index
<
=
IDI_SHELL_MY_DOCUMENTS
;
index
++
)
{
hSm
=
(
HICON
)
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
index
),
IMAGE_ICON
,
cx_small
,
cy_small
,
LR_SHARED
);
hLg
=
(
HICON
)
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
index
),
IMAGE_ICON
,
cx_large
,
cy_large
,
LR_SHARED
);
...
...
dlls/shell32/regsvr.c
View file @
b0b47774
...
...
@@ -630,6 +630,15 @@ static struct regsvr_coclass const coclass_list[] = {
SFGAO_FILESYSTEM
|
SFGAO_FOLDER
|
SFGAO_LINK
,
SFGAO_HASSUBFOLDER
|
SFGAO_FILESYSTEM
|
SFGAO_FOLDER
|
SFGAO_FILESYSANCESTOR
},
{
&
CLSID_MyDocuments
,
"My Documents"
,
NULL
,
"shell32.dll"
,
"Apartment"
,
SHELLFOLDER_WANTSFORPARSING
|
SHELLFOLDER_ATTRIBUTES
|
SHELLFOLDER_CALLFORATTRIBUTES
,
SFGAO_FILESYSANCESTOR
|
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
,
SFGAO_FILESYSTEM
},
{
NULL
}
/* list terminator */
};
...
...
@@ -646,6 +655,7 @@ static struct regsvr_interface const interface_list[] = {
*/
static
const
WCHAR
wszDesktop
[]
=
{
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
wszSlash
[]
=
{
'/'
,
0
};
static
const
WCHAR
wszMyDocuments
[]
=
{
'M'
,
'y'
,
' '
,
'D'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
's'
,
0
};
static
struct
regsvr_namespace
const
namespace_extensions_list
[]
=
{
{
...
...
@@ -653,6 +663,11 @@ static struct regsvr_namespace const namespace_extensions_list[] = {
wszDesktop
,
wszSlash
},
{
&
CLSID_MyDocuments
,
wszDesktop
,
wszMyDocuments
},
{
NULL
}
};
...
...
dlls/shell32/shell32_main.h
View file @
b0b47774
...
...
@@ -95,6 +95,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
HRESULT
WINAPI
UnixFolder_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
UnixDosFolder_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
FolderShortcut_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
MyDocuments_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
);
extern
HRESULT
CPanel_GetIconLocationW
(
LPITEMIDLIST
,
LPWSTR
,
UINT
,
int
*
);
HRESULT
WINAPI
CPanel_ExtractIconA
(
LPITEMIDLIST
pidl
,
LPCSTR
pszFile
,
UINT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
);
HRESULT
WINAPI
CPanel_ExtractIconW
(
LPITEMIDLIST
pidl
,
LPCWSTR
pszFile
,
UINT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
);
...
...
dlls/shell32/shellole.c
View file @
b0b47774
...
...
@@ -74,6 +74,7 @@ struct {
{
&
CLSID_UnixFolder
,
&
UnixFolder_Constructor
},
{
&
CLSID_UnixDosFolder
,
&
UnixDosFolder_Constructor
},
{
&
CLSID_FolderShortcut
,
&
FolderShortcut_Constructor
},
{
&
CLSID_MyDocuments
,
&
MyDocuments_Constructor
},
{
NULL
,
NULL
}
};
...
...
dlls/shell32/shfldr_unixfs.c
View file @
b0b47774
...
...
@@ -594,6 +594,9 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_EnumObjects(IShellFolder2* iface,
return
hr
;
}
static
HRESULT
CreateUnixFolder
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
,
DWORD
dwPathMode
,
const
CLSID
*
pCLSID
);
static
HRESULT
WINAPI
UnixFolder_IShellFolder2_BindToObject
(
IShellFolder2
*
iface
,
LPCITEMIDLIST
pidl
,
LPBC
pbcReserved
,
REFIID
riid
,
void
**
ppvOut
)
{
...
...
@@ -607,12 +610,9 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_BindToObject(IShellFolder2* iface
if
(
!
pidl
||
!
pidl
->
mkid
.
cb
)
return
E_INVALIDARG
;
if
(
This
->
m_dwPathMode
==
PATHMODE_DOS
)
hr
=
UnixDosFolder_Constructor
(
NULL
,
&
IID_IPersistFolder3
,
(
void
**
)
&
persistFolder
);
else
hr
=
UnixFolder_Constructor
(
NULL
,
&
IID_IPersistFolder3
,
(
void
**
)
&
persistFolder
);
hr
=
CreateUnixFolder
(
NULL
,
&
IID_IPersistFolder3
,
(
void
**
)
&
persistFolder
,
This
->
m_dwPathMode
,
This
->
m_pCLSID
);
if
(
!
SUCCEEDED
(
hr
))
return
hr
;
hr
=
IPersistFolder_QueryInterface
(
persistFolder
,
riid
,
(
void
**
)
ppvOut
);
...
...
@@ -1109,23 +1109,29 @@ static HRESULT WINAPI UnixFolder_IPersistFolder3_Initialize(IPersistFolder3* ifa
/* Find the UnixFolderClass root */
while
(
current
->
mkid
.
cb
)
{
if
(
_ILIsSpecialFolder
(
current
)
&&
(
IsEqualIID
(
&
CLSID_UnixFolder
,
_ILGetGUIDPointer
(
current
))
||
IsEqualIID
(
&
CLSID_UnixDosFolder
,
_ILGetGUIDPointer
(
current
))))
{
if
(
_ILIsSpecialFolder
(
current
)
&&
IsEqualIID
(
This
->
m_pCLSID
,
_ILGetGUIDPointer
(
current
)))
break
;
}
current
=
ILGetNext
(
current
);
}
if
(
current
&&
current
->
mkid
.
cb
)
{
if
(
IsEqualIID
(
&
CLSID_MyDocuments
,
_ILGetGUIDPointer
(
current
)))
{
WCHAR
wszMyDocumentsPath
[
MAX_PATH
];
if
(
!
SHGetSpecialFolderPathW
(
0
,
wszMyDocumentsPath
,
CSIDL_PERSONAL
,
FALSE
))
return
E_FAIL
;
PathAddBackslashW
(
wszMyDocumentsPath
);
if
(
!
UNIXFS_get_unix_path
(
wszMyDocumentsPath
,
szBasePath
))
return
E_FAIL
;
dwPathLen
=
strlen
(
szBasePath
)
+
1
;
}
else
{
dwPathLen
=
2
;
/* For the '/' prefix and the terminating '\0' */
}
root
=
current
=
ILGetNext
(
current
);
dwPathLen
=
2
;
/* For the '/' prefix and the terminating '\0' */
}
else
if
(
_ILIsDesktop
(
pidl
)
||
_ILIsValue
(
pidl
)
||
_ILIsFolder
(
pidl
))
{
/* Path rooted at Desktop */
WCHAR
wszDesktopPath
[
MAX_PATH
];
if
(
FAILED
(
SHGetSpecialFolderPathW
(
0
,
wszDesktopPath
,
CSIDL_DESKTOP
,
FALSE
)))
return
E_FAIL
;
if
(
!
SHGetSpecialFolderPathW
(
0
,
wszDesktopPath
,
CSIDL_DESKTOPDIRECTORY
,
FALSE
))
return
E_FAIL
;
PathAddBackslashW
(
wszDesktopPath
);
if
(
!
UNIXFS_get_unix_path
(
wszDesktopPath
,
szBasePath
))
return
E_FAIL
;
...
...
@@ -1154,7 +1160,7 @@ static HRESULT WINAPI UnixFolder_IPersistFolder3_Initialize(IPersistFolder3* ifa
current
=
root
;
strcpy
(
pNextDir
,
szBasePath
);
pNextDir
+=
strlen
(
szBasePath
);
if
(
This
->
m_dwPathMode
==
PATHMODE_UNIX
)
if
(
This
->
m_dwPathMode
==
PATHMODE_UNIX
||
IsEqualCLSID
(
&
CLSID_MyDocuments
,
This
->
m_pCLSID
)
)
This
->
m_dwAttributes
|=
SFGAO_FILESYSTEM
;
if
(
!
(
This
->
m_dwAttributes
&
SFGAO_FILESYSTEM
))
{
*
pNextDir
=
'\0'
;
...
...
@@ -1550,6 +1556,11 @@ HRESULT WINAPI FolderShortcut_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVO
return
CreateUnixFolder
(
pUnkOuter
,
riid
,
ppv
,
PATHMODE_DOS
,
&
CLSID_FolderShortcut
);
}
HRESULT
WINAPI
MyDocuments_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppv
)
{
TRACE
(
"(pUnkOuter=%p, riid=%p, ppv=%p)
\n
"
,
pUnkOuter
,
riid
,
ppv
);
return
CreateUnixFolder
(
pUnkOuter
,
riid
,
ppv
,
PATHMODE_DOS
,
&
CLSID_MyDocuments
);
}
/******************************************************************************
* UnixSubFolderIterator
*
...
...
dlls/shell32/shres.rc
View file @
b0b47774
...
...
@@ -10291,6 +10291,30 @@ IDI_SHELL_DESKTOP ICON desktop.ico
'FF FF FF FF FF FF'
} */
/* BINRES mydocs.ico */
IDI_SHELL_MY_DOCUMENTS ICON mydocs.ico
/* {
'00 00 01 00 01 00 10 10 10 00 01 00 04 00 28 01'
'00 00 16 00 00 00 28 00 00 00 10 00 00 00 20 00'
'00 00 01 00 04 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 99 99 00 66 CC CC 00 99 CC FF 00 99 FF'
'FF 00 F8 F8 F8 00 FF FF FF 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 11 11 11 11 11 11 00 00 15'
'34 34 33 33 21 00 01 54 43 43 43 33 20 10 01 54'
'44 44 34 33 10 10 15 44 44 34 43 42 00 20 15 44'
'44 44 34 32 06 00 11 11 11 11 11 11 46 60 01 54'
'06 66 66 66 66 00 01 54 40 66 66 65 50 20 01 54'
'44 06 56 66 01 10 00 15 55 50 66 60 00 00 00 01'
'11 11 06 00 00 00 00 00 00 00 00 00 00 00 FF FF'
'00 00 FF FF 00 00 E0 00 00 00 C0 00 00 00 C0 00'
'00 00 80 00 00 00 80 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 80 00 00 00 80 00 00 00 80 01'
'00 00 C0 0F 00 00 E0 1F 00 00 FF BF 00 00'
} */
/*--------------------- END FIXME ------------------------*/
...
...
dlls/shell32/shresdef.h
View file @
b0b47774
...
...
@@ -117,5 +117,6 @@
#define IDI_SHELL_CONTROL_PANEL 36
#define IDI_SHELL_PRINTERS_FOLDER 38
#define IDI_SHELL_FONTS_FOLDER 39
#define IDI_SHELL_MY_DOCUMENTS 235
#endif
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