notepad: Don't specify initial dir for save and open dialogs.

This commit is contained in:
Andrew Eikum 2010-07-23 13:13:11 -05:00 committed by Alexandre Julliard
parent 4b93548df1
commit 7854f191bb
1 changed files with 0 additions and 6 deletions

View File

@ -597,13 +597,11 @@ VOID DIALOG_FileOpen(VOID)
{ {
OPENFILENAMEW openfilename; OPENFILENAMEW openfilename;
WCHAR szPath[MAX_PATH]; WCHAR szPath[MAX_PATH];
WCHAR szDir[MAX_PATH];
static const WCHAR szDefaultExt[] = { 't','x','t',0 }; static const WCHAR szDefaultExt[] = { 't','x','t',0 };
static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; static const WCHAR txt_files[] = { '*','.','t','x','t',0 };
ZeroMemory(&openfilename, sizeof(openfilename)); ZeroMemory(&openfilename, sizeof(openfilename));
GetCurrentDirectoryW(ARRAY_SIZE(szDir), szDir);
lstrcpyW(szPath, txt_files); lstrcpyW(szPath, txt_files);
openfilename.lStructSize = sizeof(openfilename); openfilename.lStructSize = sizeof(openfilename);
@ -612,7 +610,6 @@ VOID DIALOG_FileOpen(VOID)
openfilename.lpstrFilter = Globals.szFilter; openfilename.lpstrFilter = Globals.szFilter;
openfilename.lpstrFile = szPath; openfilename.lpstrFile = szPath;
openfilename.nMaxFile = ARRAY_SIZE(szPath); openfilename.nMaxFile = ARRAY_SIZE(szPath);
openfilename.lpstrInitialDir = szDir;
openfilename.Flags = OFN_ENABLETEMPLATE | OFN_ENABLEHOOK | OFN_EXPLORER | openfilename.Flags = OFN_ENABLETEMPLATE | OFN_ENABLEHOOK | OFN_EXPLORER |
OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST |
OFN_HIDEREADONLY | OFN_ENABLESIZING; OFN_HIDEREADONLY | OFN_ENABLESIZING;
@ -647,13 +644,11 @@ BOOL DIALOG_FileSaveAs(VOID)
{ {
OPENFILENAMEW saveas; OPENFILENAMEW saveas;
WCHAR szPath[MAX_PATH]; WCHAR szPath[MAX_PATH];
WCHAR szDir[MAX_PATH];
static const WCHAR szDefaultExt[] = { 't','x','t',0 }; static const WCHAR szDefaultExt[] = { 't','x','t',0 };
static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; static const WCHAR txt_files[] = { '*','.','t','x','t',0 };
ZeroMemory(&saveas, sizeof(saveas)); ZeroMemory(&saveas, sizeof(saveas));
GetCurrentDirectoryW(ARRAY_SIZE(szDir), szDir);
lstrcpyW(szPath, txt_files); lstrcpyW(szPath, txt_files);
saveas.lStructSize = sizeof(OPENFILENAMEW); saveas.lStructSize = sizeof(OPENFILENAMEW);
@ -662,7 +657,6 @@ BOOL DIALOG_FileSaveAs(VOID)
saveas.lpstrFilter = Globals.szFilter; saveas.lpstrFilter = Globals.szFilter;
saveas.lpstrFile = szPath; saveas.lpstrFile = szPath;
saveas.nMaxFile = ARRAY_SIZE(szPath); saveas.nMaxFile = ARRAY_SIZE(szPath);
saveas.lpstrInitialDir = szDir;
saveas.Flags = OFN_ENABLETEMPLATE | OFN_ENABLEHOOK | OFN_EXPLORER | saveas.Flags = OFN_ENABLETEMPLATE | OFN_ENABLEHOOK | OFN_EXPLORER |
OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT |
OFN_HIDEREADONLY | OFN_ENABLESIZING; OFN_HIDEREADONLY | OFN_ENABLESIZING;