]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
Replaced /'s with \'s as BCC requires \'s for path names
[wxWidgets.git] / src / msw / filedlg.cpp
index 29ba5231bd378215943ce1783e62dc08e7423762..28faff8a8b98c79971046d69157b7b8d3bafdf44 100644 (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