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
0cd448c4
Commit
0cd448c4
authored
Feb 21, 2001
by
Chris Morgan
Committed by
Alexandre Julliard
Feb 21, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add shell support for deleting files using the Delete key.
parent
ccfe6e9c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
shell32_main.h
dlls/shell32/shell32_main.h
+6
-0
shlview.c
dlls/shell32/shlview.c
+42
-0
No files found.
dlls/shell32/shell32_main.h
View file @
0cd448c4
...
...
@@ -149,7 +149,13 @@ void InitChangeNotifications(void);
void
FreeChangeNotifications
(
void
);
/* file operation */
#define ASK_DELETE_FILE 1
#define ASK_DELETE_FOLDER 2
#define ASK_DELETE_MULTIPLE_ITEM 3
BOOL
SHELL_DeleteDirectoryA
(
LPCSTR
pszDir
,
BOOL
bShowUI
);
BOOL
SHELL_DeleteFileA
(
LPCSTR
pszFile
,
BOOL
bShowUI
);
BOOL
SHELL_WarnItemDelete
(
int
nKindOfDialog
,
LPCSTR
szDir
);
extern
HINSTANCE
SHELL_FindExecutable
(
LPCSTR
,
LPCSTR
,
LPSTR
);
...
...
dlls/shell32/shlview.c
View file @
0cd448c4
...
...
@@ -38,6 +38,7 @@
#include "docobj.h"
#include "pidl.h"
#include "shell32_main.h"
#include "shellfolder.h"
DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
@@ -1288,10 +1289,51 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
#if 0
TranslateAccelerator(This->hWnd, This->hAccel, &msg)
#endif
else
if
(
plvKeyDown
->
wVKey
==
VK_DELETE
)
{
int
i
,
item_index
;
LVITEMA
item
;
LPITEMIDLIST
*
pItems
;
ISFHelper
*
psfhlp
;
IShellFolder_QueryInterface
(
This
->
pSFParent
,
&
IID_ISFHelper
,
(
LPVOID
*
)
&
psfhlp
);
if
(
!
(
i
=
ListView_GetSelectedCount
(
This
->
hWndList
)))
break
;
/* allocate memory for the pidl array */
pItems
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPITEMIDLIST
)
*
i
);
/* retrieve all selected items */
i
=
0
;
item_index
=
-
1
;
while
(
ListView_GetSelectedCount
(
This
->
hWndList
)
>
i
)
{
/* get selected item */
item_index
=
ListView_GetNextItem
(
This
->
hWndList
,
item_index
,
LVNI_SELECTED
);
item
.
iItem
=
item_index
;
ListView_GetItemA
(
This
->
hWndList
,
&
item
);
/* get item pidl */
pItems
[
i
]
=
(
LPITEMIDLIST
)
item
.
lParam
;
i
++
;
}
/* perform the item deletion */
ISFHelper_DeleteItems
(
psfhlp
,
i
,
pItems
);
/* free pidl array memory */
HeapFree
(
GetProcessHeap
(),
0
,
pItems
);
}
else
FIXME
(
"LVN_KEYDOWN key=0x%08x
\n
"
,
plvKeyDown
->
wVKey
);
}
break
;
default:
TRACE
(
"-- %p WM_COMMAND %x unhandled
\n
"
,
This
,
lpnmh
->
code
);
break
;;
...
...
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