Prompt to overwrite in Windows Save As dialog

Add OFN_OVERWRITEPROMPT so the dialog will prompt before overwriting an existing file.
Remove the OFN_FILEMUSTEXIST flag, which works only with Open dialogs.
This commit is contained in:
Adam Coyne 2013-02-21 23:49:46 -06:00
parent d577c57e78
commit 62077c626c

View File

@ -452,7 +452,7 @@ gchar *win32_show_document_save_as_dialog(GtkWindow *parent, const gchar *title,
of.lpstrFileTitle = NULL; of.lpstrFileTitle = NULL;
of.lpstrTitle = w_title; of.lpstrTitle = w_title;
of.lpstrDefExt = L""; of.lpstrDefExt = L"";
of.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER; of.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER;
retval = GetSaveFileNameW(&of); retval = GetSaveFileNameW(&of);
if (! retval) if (! retval)