added wxOPEN/SAVE flags to wxDefaultFileSelector

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-17 09:03:30 +00:00
parent 8d75348894
commit b121fa31ec

View File

@@ -480,20 +480,23 @@ wxString wxDefaultFileSelector(bool load,
const wxChar *default_name,
wxWindow *parent)
{
wxString prompt;
wxString str;
if (load) str = _("Load %s file");
else str = _("Save %s file");
prompt.Printf(str, what);
wxString prompt;
wxString str;
if (load)
str = _("Load %s file");
else
str = _("Save %s file");
prompt.Printf(str, what);
const wxChar *ext = extension;
if (*ext == wxT('.'))
ext++;
const wxChar *ext = extension;
if (*ext == wxT('.'))
ext++;
wxString wild;
wild.Printf(wxT("*.%s"), ext);
wxString wild;
wild.Printf(wxT("*.%s"), ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
return wxFileSelector(prompt, NULL, default_name, ext, wild,
load ? wxOPEN : wxSAVE, parent);
}
// Generic file load dialog