summaryrefslogtreecommitdiff
path: root/src/wx/kdm_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-12-16 15:59:02 +0000
committerCarl Hetherington <cth@carlh.net>2016-12-16 15:59:02 +0000
commit7e4d7d9e4f146576a63c6ab1be9bca5a79b507d9 (patch)
tree96c0edcde9d9bcaface13ce6bbdf00f24d46619d /src/wx/kdm_dialog.cc
parent7af655af72ef6259368583a917987dee6d7e4646 (diff)
Confirm overwrite of KDMs (#1008).
Diffstat (limited to 'src/wx/kdm_dialog.cc')
-rw-r--r--src/wx/kdm_dialog.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 8294a12aa..5ed1169b1 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -48,6 +48,7 @@ using std::cout;
using std::vector;
using std::make_pair;
using boost::shared_ptr;
+using boost::bind;
KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
: wxDialog (parent, wxID_ANY, _("Make KDMs"))
@@ -123,6 +124,15 @@ KDMDialog::setup_sensitivity ()
_make->Enable (!_screens->screens().empty() && _timing->valid() && _cpl->has_selected());
}
+bool
+KDMDialog::confirm_overwrite (boost::filesystem::path path)
+{
+ return confirm_dialog (
+ this,
+ wxString::Format (_("File %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data())
+ );
+}
+
void
KDMDialog::make_clicked ()
{
@@ -146,7 +156,8 @@ KDMDialog::make_clicked ()
screen_kdms,
_output->directory(),
_output->name_format(),
- name_values
+ name_values,
+ bind (&KDMDialog::confirm_overwrite, this, _1)
);
}