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
d95a91ff
Commit
d95a91ff
authored
Mar 09, 2005
by
Michael Jung
Committed by
Alexandre Julliard
Mar 09, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented 'Browse' functionality for the drive mapping property
sheet.
parent
015d2a4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
4 deletions
+66
-4
Makefile.in
programs/winecfg/Makefile.in
+1
-1
driveui.c
programs/winecfg/driveui.c
+61
-1
main.c
programs/winecfg/main.c
+4
-2
No files found.
programs/winecfg/Makefile.in
View file @
d95a91ff
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
winecfg.exe
APPMODE
=
-mwindows
IMPORTS
=
comdlg32 comctl32 user32 advapi32 kernel32
IMPORTS
=
comdlg32 comctl32
shell32 ole32 shlwapi
user32 advapi32 kernel32
C_SRCS
=
\
appdefaults.c
\
...
...
programs/winecfg/driveui.c
View file @
d95a91ff
...
...
@@ -517,6 +517,66 @@ static void paint(HWND dialog)
EndPaint
(
dialog
,
&
ps
);
}
static
void
browse_for_folder
(
HWND
dialog
)
{
static
WCHAR
wszUnixRootDisplayName
[]
=
{
':'
,
':'
,
'{'
,
'C'
,
'C'
,
'7'
,
'0'
,
'2'
,
'E'
,
'B'
,
'2'
,
'-'
,
'7'
,
'D'
,
'C'
,
'5'
,
'-'
,
'1'
,
'1'
,
'D'
,
'9'
,
'-'
,
'C'
,
'6'
,
'8'
,
'7'
,
'-'
,
'0'
,
'0'
,
'0'
,
'4'
,
'2'
,
'3'
,
'8'
,
'A'
,
'0'
,
'1'
,
'C'
,
'D'
,
'}'
,
'\\'
,
'/'
,
0
};
BROWSEINFOA
bi
=
{
dialog
,
NULL
,
NULL
,
"Select the unix directory to be mapped, please."
,
0
,
NULL
,
0
,
0
};
IShellFolder
*
pDesktop
;
LPITEMIDLIST
pidlUnixRoot
,
pidlSelectedPath
;
HRESULT
hr
;
hr
=
SHGetDesktopFolder
(
&
pDesktop
);
if
(
!
SUCCEEDED
(
hr
))
return
;
hr
=
pDesktop
->
lpVtbl
->
ParseDisplayName
(
pDesktop
,
NULL
,
NULL
,
wszUnixRootDisplayName
,
NULL
,
&
pidlUnixRoot
,
NULL
);
if
(
!
SUCCEEDED
(
hr
))
{
pDesktop
->
lpVtbl
->
Release
(
pDesktop
);
return
;
}
bi
.
pidlRoot
=
pidlUnixRoot
;
pidlSelectedPath
=
SHBrowseForFolderA
(
&
bi
);
SHFree
(
pidlUnixRoot
);
if
(
pidlSelectedPath
)
{
STRRET
strSelectedPath
;
char
*
pszSelectedPath
;
HRESULT
hr
;
hr
=
pDesktop
->
lpVtbl
->
GetDisplayNameOf
(
pDesktop
,
pidlSelectedPath
,
SHGDN_FORPARSING
,
&
strSelectedPath
);
pDesktop
->
lpVtbl
->
Release
(
pDesktop
);
if
(
!
SUCCEEDED
(
hr
))
{
SHFree
(
pidlSelectedPath
);
return
;
}
hr
=
StrRetToStr
(
&
strSelectedPath
,
pidlSelectedPath
,
&
pszSelectedPath
);
SHFree
(
pidlSelectedPath
);
if
(
!
SUCCEEDED
(
hr
))
return
;
HeapFree
(
GetProcessHeap
(),
0
,
current_drive
->
unixpath
);
current_drive
->
unixpath
=
strdupA
(
pszSelectedPath
);
fill_drives_list
(
dialog
);
update_controls
(
dialog
);
CoTaskMemFree
(
pszSelectedPath
);
}
}
INT_PTR
CALLBACK
DriveDlgProc
(
HWND
dialog
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -588,7 +648,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
break
;
case
IDC_BUTTON_BROWSE_PATH
:
MessageBox
(
dialog
,
""
,
"Write me!"
,
MB_OK
);
browse_for_folder
(
dialog
);
break
;
case
IDC_RADIO_ASSIGN
:
...
...
programs/winecfg/main.c
View file @
d95a91ff
...
...
@@ -37,6 +37,7 @@
#include <winbase.h>
#include <winuser.h>
#include <commctrl.h>
#include <objbase.h>
#include <wine/debug.h>
#include "properties.h"
...
...
@@ -248,16 +249,17 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow)
}
/*
* The next
3
lines should be all that is needed
* The next
9
lines should be all that is needed
* for the Wine Configuration property sheet
*/
InitCommonControls
();
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
doPropertySheet
(
hInstance
,
NULL
)
>
0
)
{
WINE_TRACE
(
"OK
\n
"
);
}
else
{
WINE_TRACE
(
"Cancel
\n
"
);
}
CoUninitialize
();
ExitProcess
(
0
);
return
0
;
...
...
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