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
d6cb3e8b
Commit
d6cb3e8b
authored
Apr 17, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Apr 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
progman: Fix two simple bugs.
Use correctly the GetOpenFileName function. Use _lcreat instead of _lopen to create a new file.
parent
11e4b21a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
15 deletions
+7
-15
dialog.c
programs/progman/dialog.c
+6
-6
grpfile.c
programs/progman/grpfile.c
+1
-9
No files found.
programs/progman/dialog.c
View file @
d6cb3e8b
...
...
@@ -328,6 +328,7 @@ static BOOL CALLBACK DIALOG_PROGRAM_DlgProc(HWND hDlg, UINT msg, WPARAM wParam,
case
PM_BROWSE
:
{
CHAR
filename
[
MAX_PATHNAME_LEN
];
filename
[
0
]
=
0
;
if
(
DIALOG_BrowsePrograms
(
hDlg
,
filename
,
sizeof
(
filename
)))
SetDlgItemText
(
hDlg
,
PM_COMMAND_LINE
,
filename
);
return
TRUE
;
...
...
@@ -450,6 +451,7 @@ static BOOL CALLBACK DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
case
PM_BROWSE
:
{
CHAR
filename
[
MAX_PATHNAME_LEN
];
filename
[
0
]
=
0
;
if
(
DIALOG_BrowseSymbols
(
hDlg
,
filename
,
sizeof
(
filename
)))
SetDlgItemText
(
hDlg
,
PM_ICON_FILE
,
filename
);
return
TRUE
;
...
...
@@ -518,6 +520,7 @@ static BOOL CALLBACK DIALOG_EXECUTE_DlgProc(HWND hDlg, UINT msg,
case
PM_BROWSE
:
{
CHAR
filename
[
MAX_PATHNAME_LEN
];
filename
[
0
]
=
0
;
if
(
DIALOG_BrowsePrograms
(
hDlg
,
filename
,
sizeof
(
filename
)))
SetDlgItemText
(
hDlg
,
PM_COMMAND
,
filename
);
return
TRUE
;
...
...
@@ -559,21 +562,19 @@ static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter,
{
OPENFILENAME
openfilename
;
CHAR
szPath
[
MAX_PATH
];
CHAR
szDir
[
MAX_PATH
];
CHAR
szDefaultExt
[]
=
"exe"
;
ZeroMemory
(
&
openfilename
,
sizeof
(
openfilename
));
GetCurrentDirectory
(
sizeof
(
szDir
),
szDir
);
lstrcpy
(
szPath
,
"*.exe"
);
/* FIXME is this correct ? */
openfilename
.
lStructSize
=
sizeof
(
openfilename
);
openfilename
.
hwndOwner
=
Globals
.
hMainWnd
;
openfilename
.
hInstance
=
Globals
.
hInstance
;
openfilename
.
lpstrFile
=
szPath
;
openfilename
.
nMaxFile
=
sizeof
(
szPath
);
openfilename
.
lpstrFilter
=
lpszzFilter
;
openfilename
.
lpstrFile
=
lpstrFile
;
openfilename
.
nMaxFile
=
nMaxFile
;
openfilename
.
lpstrInitialDir
=
szDir
;
openfilename
.
Flags
=
0
;
openfilename
.
lpstrDefExt
=
szDefaultExt
;
...
...
@@ -591,7 +592,6 @@ static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter,
openfilename
.
lpTemplateName
=
0
;
return
GetOpenFileName
(
&
openfilename
);
/* FIXME */
}
/***********************************************************************
...
...
programs/progman/grpfile.c
View file @
d6cb3e8b
...
...
@@ -399,16 +399,8 @@ BOOL GRPFILE_WriteGroupFile(HLOCAL hGroup)
MB_OKCANCEL
|
MB_DEFBUTTON2
))
return
FALSE
;
}
/* FIXME */
if
(
OpenFile
(
szPath
,
&
dummy
,
OF_EXIST
)
==
HFILE_ERROR
)
{
CHAR
msg
[
MAX_PATHNAME_LEN
+
200
];
wsprintf
(
msg
,
"Cause of a bug you must now touch the file %s
\n
"
,
szPath
);
MessageBox
(
Globals
.
hMainWnd
,
msg
,
""
,
MB_OK
);
}
/* Open file */
file
=
_l
open
(
szPath
,
OF_WRITE
);
file
=
_l
creat
(
szPath
,
0
);
if
(
file
!=
HFILE_ERROR
)
{
ret
=
GRPFILE_DoWriteGroupFile
(
file
,
group
);
...
...
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