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:
@@ -480,20 +480,23 @@ wxString wxDefaultFileSelector(bool load,
|
|||||||
const wxChar *default_name,
|
const wxChar *default_name,
|
||||||
wxWindow *parent)
|
wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxString prompt;
|
wxString prompt;
|
||||||
wxString str;
|
wxString str;
|
||||||
if (load) str = _("Load %s file");
|
if (load)
|
||||||
else str = _("Save %s file");
|
str = _("Load %s file");
|
||||||
prompt.Printf(str, what);
|
else
|
||||||
|
str = _("Save %s file");
|
||||||
|
prompt.Printf(str, what);
|
||||||
|
|
||||||
const wxChar *ext = extension;
|
const wxChar *ext = extension;
|
||||||
if (*ext == wxT('.'))
|
if (*ext == wxT('.'))
|
||||||
ext++;
|
ext++;
|
||||||
|
|
||||||
wxString wild;
|
wxString wild;
|
||||||
wild.Printf(wxT("*.%s"), ext);
|
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
|
// Generic file load dialog
|
||||||
|
Reference in New Issue
Block a user