diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-07 14:48:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-09 13:44:55 +0100 |
| commit | 89e202dd965d8f9cc94b965c804a31b7e01adb94 (patch) | |
| tree | 2ec97bfff0e5ff1fbfc3c04465300bb111a799bb /src | |
| parent | 147a09e0b354a341b21a139437df2fa3cb02f3af (diff) | |
Add message_dialog.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/wx_util.cc | 14 | ||||
| -rw-r--r-- | src/wx/wx_util.h | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 3d37c373b..fb10eedc0 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -84,7 +84,19 @@ add_label_to_grid_bag_sizer (wxGridBagSizer* s, wxWindow* p, wxString t, bool, w void error_dialog (wxWindow* parent, wxString m) { - wxMessageDialog* d = new wxMessageDialog (parent, m, _("DCP-o-matic"), wxOK); + wxMessageDialog* d = new wxMessageDialog (parent, m, _("DCP-o-matic"), wxOK | wxICON_ERROR); + d->ShowModal (); + d->Destroy (); +} + +/** Pop up an error dialogue box. + * @param parent Parent. + * @param m Message. + */ +void +message_dialog (wxWindow* parent, wxString m) +{ + wxMessageDialog* d = new wxMessageDialog (parent, m, _("DCP-o-matic"), wxOK | wxICON_INFORMATION); d->ShowModal (); d->Destroy (); } diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index 5afb978b7..dcf137738 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -58,6 +58,7 @@ class wxGridBagSizer; #define S_(x) context_translation(x) extern void error_dialog (wxWindow *, wxString); +extern void message_dialog (wxWindow *, wxString); extern bool confirm_dialog (wxWindow *, wxString); extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, bool left, int prop = 0); extern wxStaticText* add_label_to_grid_bag_sizer (wxGridBagSizer *, wxWindow *, wxString, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan); |
