If lpstrTitle is NULL, set it to either 'Open File' or 'Save as'.

Constify the string constants.
This commit is contained in:
Francois Gouget 2004-04-26 20:02:39 +00:00 committed by Alexandre Julliard
parent 48eae0bbe8
commit 85cad2cdbb
1 changed files with 2 additions and 4 deletions

View File

@ -84,8 +84,6 @@ static HICON hFloppy = 0;
static HICON hHDisk = 0;
static HICON hCDRom = 0;
static HICON hNet = 0;
static char defaultopen[]="Open File";
static char defaultsave[]="Save as";
/***********************************************************************
* FileDlg_Init [internal]
@ -971,8 +969,8 @@ void FILEDLG_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open
str = ofnA->lpstrTitle;
else
/* Allocates default title (FIXME : get it from resource) */
str = open ? defaultopen:defaultsave;
RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpstrTitle);
str = open ? "Open File" : "Save as";
RtlCreateUnicodeStringFromAsciiz (&usBuffer,str);
ofnW->lpstrTitle = usBuffer.Buffer;
ofnW->Flags = ofnA->Flags;
ofnW->nFileOffset = ofnA->nFileOffset;