Append default extension before showing file save dialog, not after.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 9 Oct 2009 13:05:20 +0000 (13:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 9 Oct 2009 13:05:20 +0000 (13:05 +0000)
commitfa333077f53d0907364ac39fc55d9de0b838fb5a
tree11116ab3ff994ac2e777059e10737734f6e40543
parentfd4618549b4cb22d84930b45853dc09f489e732c
Append default extension before showing file save dialog, not after.

Appending the extension after the dialog was hidden is a bad idea as it
misleads the user by using a different file name from the one shown in the
dialog. It is also dangerous as it bypassed wxFD_OVERWRITE_PROMPT check.

So just append the default extension to the initial file name if it doesn't
have any but don't modify the file name once it was accepted by user.

Closes #11256.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/gtk/filedlg.cpp