diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-24 22:30:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-24 22:30:05 +0100 |
| commit | ccc07eebc492d74c351c235584fd708c46b5b656 (patch) | |
| tree | 69e4efeb452b6b20cb123fbb582a1538d660eb6f /src/wx | |
| parent | 8805ae23ce2c3a19fc6a1fd341cff899bfb61128 (diff) | |
Fix #124 (allow use of existing directories for new films).
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/wx_util.cc | 10 | ||||
| -rw-r--r-- | src/wx/wx_util.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 720a058cb..77f5da293 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -63,6 +63,16 @@ error_dialog (wxWindow* parent, wxString m) d->Destroy (); } +bool +confirm_dialog (wxWindow* parent, wxString m) +{ + wxMessageDialog* d = new wxMessageDialog (parent, m, _("DVD-o-matic"), wxYES_NO | wxICON_QUESTION); + int const r = d->ShowModal (); + d->Destroy (); + return r == wxID_YES; +} + + /** @param s wxWidgets string. * @return Corresponding STL string. */ diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index bff3d7982..b3ab706df 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -31,6 +31,7 @@ class wxGridBagSizer; */ extern void error_dialog (wxWindow *, wxString); +extern bool confirm_dialog (wxWindow *, wxString); extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, int prop = 0); extern wxStaticText* add_label_to_grid_bag_sizer (wxGridBagSizer *, wxWindow *, wxString, wxGBPosition, wxGBSpan span = wxDefaultSpan); extern std::string wx_to_std (wxString); |
