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
186d9497
Commit
186d9497
authored
Jun 16, 2023
by
Jacob Czekalla
Committed by
Alexandre Julliard
Jul 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Add parent folder button to IFileDialog.
parent
12869e46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
itemdlg.c
dlls/comdlg32/itemdlg.c
+22
-2
No files found.
dlls/comdlg32/itemdlg.c
View file @
186d9497
...
...
@@ -38,6 +38,7 @@
#define IDC_NAV_TOOLBAR 200
#define IDC_NAVBACK 201
#define IDC_NAVFORWARD 202
#define IDC_NAVUP 203
#include <initguid.h>
/* This seems to be another version of IID_IFileDialogCustomize. If
...
...
@@ -1965,8 +1966,9 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd)
{
HWND
htoolbar
;
TBADDBITMAP
tbab
;
TBBUTTON
button
[
2
];
TBBUTTON
button
[
3
];
int
height
;
int
navUpImgIndex
;
htoolbar
=
CreateWindowExW
(
0
,
TOOLBARCLASSNAMEW
,
NULL
,
TBSTYLE_FLAT
|
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
0
,
0
,
...
...
@@ -1975,6 +1977,9 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd)
tbab
.
hInst
=
HINST_COMMCTRL
;
tbab
.
nID
=
IDB_HIST_LARGE_COLOR
;
SendMessageW
(
htoolbar
,
TB_ADDBITMAP
,
0
,
(
LPARAM
)
&
tbab
);
tbab
.
nID
=
IDB_VIEW_LARGE_COLOR
;
navUpImgIndex
=
SendMessageW
(
htoolbar
,
TB_ADDBITMAP
,
0
,
(
LPARAM
)
&
tbab
);
navUpImgIndex
+=
VIEW_PARENTFOLDER
;
button
[
0
].
iBitmap
=
HIST_BACK
;
button
[
0
].
idCommand
=
IDC_NAVBACK
;
...
...
@@ -1990,7 +1995,14 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd)
button
[
1
].
dwData
=
0
;
button
[
1
].
iString
=
0
;
SendMessageW
(
htoolbar
,
TB_ADDBUTTONSW
,
2
,
(
LPARAM
)
button
);
button
[
2
].
iBitmap
=
navUpImgIndex
;
button
[
2
].
idCommand
=
IDC_NAVUP
;
button
[
2
].
fsState
=
TBSTATE_ENABLED
;
button
[
2
].
fsStyle
=
BTNS_BUTTON
;
button
[
2
].
dwData
=
0
;
button
[
2
].
iString
=
0
;
SendMessageW
(
htoolbar
,
TB_ADDBUTTONSW
,
3
,
(
LPARAM
)
button
);
height
=
MulDiv
(
24
,
This
->
dpi_y
,
USER_DEFAULT_SCREEN_DPI
);
SendMessageW
(
htoolbar
,
TB_SETBUTTONSIZE
,
0
,
MAKELPARAM
(
height
,
height
));
SendMessageW
(
htoolbar
,
TB_AUTOSIZE
,
0
,
0
);
...
...
@@ -2281,6 +2293,13 @@ static LRESULT on_command_filetype(FileDialogImpl *This, WPARAM wparam, LPARAM l
return
FALSE
;
}
static
LRESULT
on_browse_up
(
FileDialogImpl
*
This
)
{
TRACE
(
"%p
\n
"
,
This
);
IExplorerBrowser_BrowseToIDList
(
This
->
peb
,
NULL
,
SBSP_PARENT
);
return
FALSE
;
}
static
LRESULT
on_wm_command
(
FileDialogImpl
*
This
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
LOWORD
(
wparam
))
...
...
@@ -2291,6 +2310,7 @@ static LRESULT on_wm_command(FileDialogImpl *This, WPARAM wparam, LPARAM lparam)
case
IDC_NAVBACK
:
return
on_browse_back
(
This
);
case
IDC_NAVFORWARD
:
return
on_browse_forward
(
This
);
case
IDC_FILETYPE
:
return
on_command_filetype
(
This
,
wparam
,
lparam
);
case
IDC_NAVUP
:
return
on_browse_up
(
This
);
default:
TRACE
(
"Unknown command.
\n
"
);
}
return
FALSE
;
...
...
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