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
08e70861
Commit
08e70861
authored
Dec 18, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
Dec 18, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the current directory as the user browses the directory tree.
parent
2a53800d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
filedlg95.c
dlls/commdlg/filedlg95.c
+16
-2
filedlgbrowser.c
dlls/commdlg/filedlgbrowser.c
+10
-0
No files found.
dlls/commdlg/filedlg95.c
View file @
08e70861
...
...
@@ -26,7 +26,7 @@
*
* FIXME: flags not implemented: OFN_CREATEPROMPT, OFN_DONTADDTORECENT,
* OFN_ENABLEINCLUDENOTIFY, OFN_ENABLESIZING, OFN_EXTENSIONDIFFERENT,
* OFN_NO
CHANGEDIR, OFN_NO
DEREFERENCELINKS, OFN_NOREADONLYRETURN,
* OFN_NODEREFERENCELINKS, OFN_NOREADONLYRETURN,
* OFN_NOTESTFILECREATE, OFN_OVERWRITEPROMPT, OFN_USEMONIKERS
*
* FIXME: lCustData for lpfnHook (WM_INITDIALOG)
...
...
@@ -58,7 +58,7 @@ DEFAULT_DEBUG_CHANNEL(commdlg);
#define UNIMPLEMENTED_FLAGS \
(OFN_CREATEPROMPT | OFN_DONTADDTORECENT |\
OFN_ENABLEINCLUDENOTIFY | OFN_ENABLESIZING | OFN_EXTENSIONDIFFERENT |\
OFN_NO
CHANGEDIR | OFN_NO
DEREFERENCELINKS | OFN_NOREADONLYRETURN |\
OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN |\
OFN_NOTESTFILECREATE | OFN_OVERWRITEPROMPT
/*| OFN_USEMONIKERS*/
)
#define IsHooked(fodInfos) \
...
...
@@ -274,6 +274,7 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
FileOpenDlgInfos
*
fodInfos
;
HINSTANCE
hInstance
;
LPCSTR
lpstrInitialDir
=
(
LPCSTR
)
-
1
;
LPSTR
lpstrSavDir
=
NULL
;
DWORD
dwFlags
=
0
;
/* Initialise FileOpenDlgInfos structure*/
...
...
@@ -287,6 +288,13 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
hInstance
=
ofn
->
hInstance
;
fodInfos
->
ofnInfos
->
hInstance
=
MapHModuleLS
(
ofn
->
hInstance
);
/* save current directory */
if
(
ofn
->
Flags
&
OFN_NOCHANGEDIR
)
{
lpstrSavDir
=
MemAlloc
(
MAX_PATH
);
GetCurrentDirectoryA
(
MAX_PATH
,
lpstrSavDir
);
}
dwFlags
=
ofn
->
Flags
;
ofn
->
Flags
=
ofn
->
Flags
|
OFN_WINE
;
...
...
@@ -307,6 +315,12 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
ret
=
0
;
}
if
(
lpstrSavDir
)
{
SetCurrentDirectoryA
(
lpstrSavDir
);
MemFree
(
lpstrSavDir
);
}
if
(
lpstrInitialDir
!=
(
LPCSTR
)
-
1
)
{
MemFree
((
LPVOID
)(
ofn
->
lpstrInitialDir
));
...
...
dlls/commdlg/filedlgbrowser.c
View file @
08e70861
...
...
@@ -71,6 +71,14 @@ extern HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode);
* Helper functions
*/
static
void
COMDLG32_UpdateCurrentDir
(
FileOpenDlgInfos
*
fodInfos
)
{
char
lpstrPath
[
MAX_PATH
];
COMDLG32_SHGetPathFromIDListA
(
fodInfos
->
ShellInfos
.
pidlAbsCurrent
,
lpstrPath
);
SetCurrentDirectoryA
(
lpstrPath
);
TRACE
(
"new current folder %s
\n
"
,
lpstrPath
);
}
/* copied from shell32 to avoid linking to it */
static
HRESULT
COMDLG32_StrRetToStrNW
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
LPITEMIDLIST
pidl
)
{
...
...
@@ -364,6 +372,8 @@ HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
COMDLG32_SHFree
((
LPVOID
)
fodInfos
->
ShellInfos
.
pidlAbsCurrent
);
fodInfos
->
ShellInfos
.
pidlAbsCurrent
=
pidlTmp
;
COMDLG32_UpdateCurrentDir
(
fodInfos
);
/* Create the window */
TRACE
(
"create view window
\n
"
);
if
(
FAILED
(
hRes
=
IShellView_CreateViewWindow
(
psvTmp
,
NULL
,
...
...
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