+ wxString defaultFileNameWithExt = defaultFileName;
+ if ( !wildCard.empty() && !defaultFileName.empty() &&
+ !wxFileName(defaultFileName).HasExt() )
+ {
+ // append the default extension to the initial file name: GTK won't do
+ // it for us by default (unlike e.g. MSW)
+ const wxString defaultExt = m_fc.GetCurrentWildCard().AfterFirst('.');
+ if ( defaultExt.find_first_of("?*") == wxString::npos )
+ defaultFileNameWithExt += "." + defaultExt;
+ }
+
+