Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7df7cdb6
Commit
7df7cdb6
authored
Dec 19, 2002
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Dec 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduced some declarations and resources needed for a more complete
implementation of SHFileOperation.
parent
31a7cad4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
38 deletions
+42
-38
shell32_main.h
dlls/shell32/shell32_main.h
+6
-4
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+1
-1
shlfileop.c
dlls/shell32/shlfileop.c
+31
-33
shres.rc
dlls/shell32/shres.rc
+2
-0
shresdef.h
dlls/shell32/shresdef.h
+2
-0
No files found.
dlls/shell32/shell32_main.h
View file @
7df7cdb6
...
...
@@ -160,13 +160,15 @@ void InitChangeNotifications(void);
void
FreeChangeNotifications
(
void
);
/* file operation */
#define ASK_DELETE_FILE 1
#define ASK_DELETE_FOLDER 2
#define ASK_DELETE_MULTIPLE_ITEM 3
#define ASK_DELETE_FILE 1
#define ASK_DELETE_FOLDER 2
#define ASK_DELETE_MULTIPLE_ITEM 3
#define ASK_CREATE_FOLDER 4
#define ASK_OVERWRITE_FILE 5
BOOL
SHELL_DeleteDirectoryA
(
LPCSTR
pszDir
,
BOOL
bShowUI
);
BOOL
SHELL_DeleteFileA
(
LPCSTR
pszFile
,
BOOL
bShowUI
);
BOOL
SHELL_
WarnItemDelete
(
int
nKindOfDialog
,
LPCSTR
szDir
);
BOOL
SHELL_
ConfirmDialog
(
int
nKindOfDialog
,
LPCSTR
szDir
);
/* 16-bit functions */
void
WINAPI
DragAcceptFiles16
(
HWND16
hWnd
,
BOOL16
b
);
...
...
dlls/shell32/shfldr_fs.c
View file @
7df7cdb6
...
...
@@ -978,7 +978,7 @@ static HRESULT WINAPI ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPC
char
tmp
[
8
];
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
cidl
);
if
(
!
SHELL_
WarnItemDelete
(
ASK_DELETE_MULTIPLE_ITEM
,
tmp
))
if
(
!
SHELL_
ConfirmDialog
(
ASK_DELETE_MULTIPLE_ITEM
,
tmp
))
return
E_FAIL
;
bConfirm
=
FALSE
;
}
...
...
dlls/shell32/shlfileop.c
View file @
7df7cdb6
...
...
@@ -35,41 +35,39 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
BOOL
SHELL_
WarnItemDelete
(
int
nKindOfDialog
,
LPCSTR
szDir
)
BOOL
SHELL_
ConfirmDialog
(
int
nKindOfDialog
,
LPCSTR
szDir
)
{
char
szCaption
[
255
],
szText
[
255
],
szBuffer
[
MAX_PATH
+
256
];
if
(
nKindOfDialog
==
ASK_DELETE_FILE
)
{
LoadStringA
(
shell32_hInstance
,
IDS_DELETEITEM_TEXT
,
szText
,
sizeof
(
szText
));
LoadStringA
(
shell32_hInstance
,
IDS_DELETEITEM_CAPTION
,
szCaption
,
sizeof
(
szCaption
));
}
else
if
(
nKindOfDialog
==
ASK_DELETE_FOLDER
)
{
LoadStringA
(
shell32_hInstance
,
IDS_DELETEITEM_TEXT
,
szText
,
sizeof
(
szText
));
LoadStringA
(
shell32_hInstance
,
IDS_DELETEFOLDER_CAPTION
,
szCaption
,
sizeof
(
szCaption
));
}
else
if
(
nKindOfDialog
==
ASK_DELETE_MULTIPLE_ITEM
)
{
LoadStringA
(
shell32_hInstance
,
IDS_DELETEMULTIPLE_TEXT
,
szText
,
sizeof
(
szText
));
LoadStringA
(
shell32_hInstance
,
IDS_DELETEITEM_CAPTION
,
szCaption
,
sizeof
(
szCaption
));
}
else
{
FIXME
(
"Called without a valid nKindOfDialog specified!
\n
"
);
LoadStringA
(
shell32_hInstance
,
IDS_DELETEITEM_TEXT
,
szText
,
sizeof
(
szText
));
LoadStringA
(
shell32_hInstance
,
IDS_DELETEITEM_CAPTION
,
szCaption
,
sizeof
(
szCaption
));
UINT
caption_resource_id
,
text_resource_id
;
switch
(
nKindOfDialog
)
{
case
ASK_DELETE_FILE
:
caption_resource_id
=
IDS_DELETEITEM_CAPTION
;
text_resource_id
=
IDS_DELETEITEM_TEXT
;
break
;
case
ASK_DELETE_FOLDER
:
caption_resource_id
=
IDS_DELETEFOLDER_CAPTION
;
text_resource_id
=
IDS_DELETEITEM_TEXT
;
break
;
case
ASK_DELETE_MULTIPLE_ITEM
:
caption_resource_id
=
IDS_DELETEITEM_CAPTION
;
text_resource_id
=
IDS_DELETEMULTIPLE_TEXT
;
break
;
case
ASK_OVERWRITE_FILE
:
caption_resource_id
=
IDS_OVERWRITEFILE_CAPTION
;
text_resource_id
=
IDS_OVERWRITEFILE_TEXT
;
break
;
default:
FIXME
(
" Unhandled nKindOfDialog %d stub
\n
"
,
nKindOfDialog
);
return
FALSE
;
}
FormatMessageA
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
szText
,
0
,
0
,
szBuffer
,
sizeof
(
szBuffer
),
(
va_list
*
)
&
szDir
);
LoadStringA
(
shell32_hInstance
,
caption_resource_id
,
szCaption
,
sizeof
(
szCaption
));
LoadStringA
(
shell32_hInstance
,
text_resource_id
,
szText
,
sizeof
(
szText
));
FormatMessageA
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
szText
,
0
,
0
,
szBuffer
,
sizeof
(
szBuffer
),
(
va_list
*
)
&
szDir
);
return
(
IDOK
==
MessageBoxA
(
GetActiveWindow
(),
szBuffer
,
szCaption
,
MB_OKCANCEL
|
MB_ICONEXCLAMATION
));
}
...
...
@@ -91,7 +89,7 @@ BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI)
PathAddBackslashA
(
szTemp
);
strcat
(
szTemp
,
"*.*"
);
if
(
bShowUI
&&
!
SHELL_
WarnItemDelete
(
ASK_DELETE_FOLDER
,
pszDir
))
if
(
bShowUI
&&
!
SHELL_
ConfirmDialog
(
ASK_DELETE_FOLDER
,
pszDir
))
return
FALSE
;
if
(
INVALID_HANDLE_VALUE
!=
(
hFind
=
FindFirstFileA
(
szTemp
,
&
wfd
)))
...
...
@@ -124,7 +122,7 @@ BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI)
BOOL
SHELL_DeleteFileA
(
LPCSTR
pszFile
,
BOOL
bShowUI
)
{
if
(
bShowUI
&&
!
SHELL_
WarnItemDelete
(
ASK_DELETE_FILE
,
pszFile
))
if
(
bShowUI
&&
!
SHELL_
ConfirmDialog
(
ASK_DELETE_FILE
,
pszFile
))
return
FALSE
;
return
DeleteFileA
(
pszFile
);
...
...
dlls/shell32/shres.rc
View file @
7df7cdb6
...
...
@@ -152,6 +152,8 @@ STRINGTABLE DISCARDABLE
IDS_DELETEFOLDER_CAPTION "Confirm folder delete"
IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?"
IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?"
IDS_OVERWRITEFILE_TEXT "OverWrite File %1?"
IDS_OVERWRITEFILE_CAPTION "Confirm File OverWrite"
}
shv_accel ACCELERATORS
...
...
dlls/shell32/shresdef.h
View file @
7df7cdb6
...
...
@@ -46,6 +46,8 @@
#define IDS_DELETEFOLDER_CAPTION 33
#define IDS_DELETEITEM_TEXT 34
#define IDS_DELETEMULTIPLE_TEXT 35
#define IDS_OVERWRITEFILE_CAPTION 36
#define IDS_OVERWRITEFILE_TEXT 37
/* browse for folder dialog box */
#define IDD_STATUS 0x3743
...
...
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