Commit 9cbc42bb authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

- the correct registry location to override is User Shell Folders, not

Shell Folders - if User Shell Folders doesn't exist in HKCU, HKLM should be tried - SHGetSpecialFolderPath should call SHGetFolderPath, not vice-versa - the default values should be localizable - some of the parameter checking and returned LPITEMIDLISTs were a bit off
parent 11a7b29a
......@@ -29,6 +29,7 @@
#include "ole2.h"
#include "shlguid.h"
#include "shell32_main.h"
#include "wine/debug.h"
......@@ -518,6 +519,8 @@ HRESULT WINAPI SHELL32_DllRegisterServer()
hr = register_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = register_interfaces(interface_list);
if (SUCCEEDED(hr))
hr = SHELL_RegisterShellFolders();
return hr;
}
......
......@@ -186,3 +186,35 @@ STRINGTABLE DISCARDABLE
IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown your Wine session?"
}
/* shell folder path default values */
STRINGTABLE DISCARDABLE
{
IDS_PROGRAMS "Start Menu\\Programs"
IDS_PERSONAL "My Documents"
IDS_FAVORITES "Favorites"
IDS_STARTUP "Start Menu\\Programs\\StartUp"
IDS_RECENT "Recent"
IDS_SENDTO "SendTo"
IDS_STARTMENU "Start Menu"
IDS_MYMUSIC "My Documents\\My Music"
IDS_MYVIDEO "My Documents\\My Video"
IDS_DESKTOPDIRECTORY "Desktop"
IDS_NETHOOD "NetHood"
IDS_TEMPLATES "Templates"
IDS_APPDATA "Application Data"
IDS_PRINTHOOD "PrintHood"
IDS_LOCAL_APPDATA "Local Settings\\Application Data"
IDS_INTERNET_CACHE "Temporary Internet Files"
IDS_COOKIES "Cookies"
IDS_HISTORY "History"
IDS_PROGRAM_FILES "Program Files"
IDS_MYPICTURES "My Documents\\My Pictures"
IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files"
IDS_COMMON_DOCUMENTS "Documents"
IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools"
IDS_COMMON_MUSIC "Documents\\My Music"
IDS_COMMON_PICTURES "Documents\\My Pictures"
IDS_COMMON_VIDEO "Documents\\My Video"
IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning"
}
......@@ -224,4 +224,7 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
extern WCHAR swShell32Name[MAX_PATH];
/* Default shell folder value registration */
HRESULT SHELL_RegisterShellFolders(void);
#endif
......@@ -56,6 +56,34 @@
#define IDS_SHUTDOWN_TITLE 42
#define IDS_SHUTDOWN_PROMPT 43
#define IDS_PROGRAMS 45
#define IDS_PERSONAL 46
#define IDS_FAVORITES 47
#define IDS_STARTUP 48
#define IDS_RECENT 49
#define IDS_SENDTO 50
#define IDS_STARTMENU 51
#define IDS_MYMUSIC 52
#define IDS_MYVIDEO 53
#define IDS_DESKTOPDIRECTORY 54
#define IDS_NETHOOD 55
#define IDS_TEMPLATES 56
#define IDS_APPDATA 57
#define IDS_PRINTHOOD 58
#define IDS_LOCAL_APPDATA 59
#define IDS_INTERNET_CACHE 60
#define IDS_COOKIES 61
#define IDS_HISTORY 62
#define IDS_PROGRAM_FILES 63
#define IDS_MYPICTURES 64
#define IDS_PROGRAM_FILES_COMMON 65
#define IDS_COMMON_DOCUMENTS 66
#define IDS_ADMINTOOLS 67
#define IDS_COMMON_MUSIC 68
#define IDS_COMMON_PICTURES 69
#define IDS_COMMON_VIDEO 70
#define IDS_CDBURN_AREA 71
/* browse for folder dialog box */
#define IDD_STATUS 0x3743
#define IDD_TITLE 0x3742
......
Makefile
generated.ok
shellpath.ok
shlfileop.ok
shlfolder.ok
string.ok
......
......@@ -3,11 +3,12 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = shell32.dll
IMPORTS = shell32 ole32
IMPORTS = shell32 ole32 shlwapi advapi32
EXTRALIBS = -luuid
CTESTS = \
generated.c \
shellpath.c \
shlfileop.c \
shlfolder.c \
string.c
......
......@@ -513,6 +513,7 @@ typedef struct
/***** Dialogs *****/
#define IS_INTRESOURCE(x) (((ULONG_PTR)(x) >> 16) == 0)
#define MAKEINTRESOURCEA(i) (LPSTR)((ULONG_PTR)((WORD)(i)))
#define MAKEINTRESOURCEW(i) (LPWSTR)((ULONG_PTR)((WORD)(i)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment