void export_cinemas_file ()
{
wxFileDialog* d = new wxFileDialog (
- _panel, _("Select Cinemas File"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml"), wxFD_SAVE
+ _panel, _("Select Cinemas File"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml"),
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT
);
if (d->ShowModal () == wxID_OK) {
- optional<boost::filesystem::path> path = path_from_file_dialog (d, "xml");
- if (path) {
- boost::filesystem::copy_file (Config::instance()->cinemas_file(), *path);
- }
+ boost::filesystem::copy_file (Config::instance()->cinemas_file(), wx_to_std(d->GetPath()));
}
d->Destroy ();
}