From 62077c626c10116bde050d50cb4aef0e167f5eee Mon Sep 17 00:00:00 2001 From: Adam Coyne Date: Thu, 21 Feb 2013 23:49:46 -0600 Subject: [PATCH] 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. --- src/win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32.c b/src/win32.c index cf8ff657..83a346fa 100644 --- a/src/win32.c +++ b/src/win32.c @@ -452,7 +452,7 @@ gchar *win32_show_document_save_as_dialog(GtkWindow *parent, const gchar *title, of.lpstrFileTitle = NULL; of.lpstrTitle = w_title; of.lpstrDefExt = L""; - of.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER; + of.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER; retval = GetSaveFileNameW(&of); if (! retval)