From 85cad2cdbbe376da1237fc9c4ce4447dc61d5cc1 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 26 Apr 2004 20:02:39 +0000 Subject: [PATCH] If lpstrTitle is NULL, set it to either 'Open File' or 'Save as'. Constify the string constants. --- dlls/commdlg/filedlg16.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/commdlg/filedlg16.c b/dlls/commdlg/filedlg16.c index ec603fff7c4..4c3bbdd979a 100644 --- a/dlls/commdlg/filedlg16.c +++ b/dlls/commdlg/filedlg16.c @@ -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; -- 2.11.4.GIT