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
2e25a43f
Commit
2e25a43f
authored
Sep 14, 2018
by
Fabian Maurer
Committed by
Alexandre Julliard
Sep 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/brsfolder: Add shortcut to rename folders with the F2 key.
Signed-off-by:
Fabian Maurer
<
dark.shadow4@web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1d65be60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
7 deletions
+29
-7
brsfolder.c
dlls/shell32/brsfolder.c
+29
-7
No files found.
dlls/shell32/brsfolder.c
View file @
2e25a43f
...
...
@@ -613,6 +613,32 @@ static LRESULT BrsFolder_Treeview_Rename(browse_info *info, NMTVDISPINFOW *pnmtv
return
0
;
}
static
HRESULT
BrsFolder_Rename
(
browse_info
*
info
,
HTREEITEM
rename
)
{
SendMessageW
(
info
->
hwndTreeView
,
TVM_SELECTITEM
,
TVGN_CARET
,
(
LPARAM
)
rename
);
SendMessageW
(
info
->
hwndTreeView
,
TVM_EDITLABELW
,
0
,
(
LPARAM
)
rename
);
return
S_OK
;
}
static
LRESULT
BrsFolder_Treeview_Keydown
(
browse_info
*
info
,
LPNMTVKEYDOWN
keydown
)
{
HTREEITEM
selected_item
;
/* Old dialog doesn't support those advanced features */
if
(
!
(
info
->
lpBrowseInfo
->
ulFlags
&
BIF_NEWDIALOGSTYLE
))
return
0
;
selected_item
=
(
HTREEITEM
)
SendMessageW
(
info
->
hwndTreeView
,
TVM_GETNEXTITEM
,
TVGN_CARET
,
0
);
switch
(
keydown
->
wVKey
)
{
case
VK_F2
:
BrsFolder_Rename
(
info
,
selected_item
);
break
;
}
return
0
;
}
static
LRESULT
BrsFolder_OnNotify
(
browse_info
*
info
,
UINT
CtlID
,
LPNMHDR
lpnmh
)
{
NMTREEVIEWW
*
pnmtv
=
(
NMTREEVIEWW
*
)
lpnmh
;
...
...
@@ -640,6 +666,9 @@ static LRESULT BrsFolder_OnNotify( browse_info *info, UINT CtlID, LPNMHDR lpnmh
case
TVN_ENDLABELEDITW
:
return
BrsFolder_Treeview_Rename
(
info
,
(
LPNMTVDISPINFOW
)
pnmtv
);
case
TVN_KEYDOWN
:
return
BrsFolder_Treeview_Keydown
(
info
,
(
LPNMTVKEYDOWN
)
pnmtv
);
default:
WARN
(
"unhandled (%d)
\n
"
,
pnmtv
->
hdr
.
code
);
break
;
...
...
@@ -721,13 +750,6 @@ static BOOL BrsFolder_OnCreate( HWND hWnd, browse_info *info )
return
TRUE
;
}
static
HRESULT
BrsFolder_Rename
(
browse_info
*
info
,
HTREEITEM
rename
)
{
SendMessageW
(
info
->
hwndTreeView
,
TVM_SELECTITEM
,
TVGN_CARET
,
(
LPARAM
)
rename
);
SendMessageW
(
info
->
hwndTreeView
,
TVM_EDITLABELW
,
0
,
(
LPARAM
)
rename
);
return
S_OK
;
}
static
HRESULT
BrsFolder_NewFolder
(
browse_info
*
info
)
{
DWORD
flags
=
BrowseFlagsToSHCONTF
(
info
->
lpBrowseInfo
->
ulFlags
);
...
...
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