Add message_dialog.
authorCarl Hetherington <cth@carlh.net>
Wed, 7 Oct 2015 13:48:27 +0000 (14:48 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 9 Oct 2015 12:44:55 +0000 (13:44 +0100)
src/wx/wx_util.cc
src/wx/wx_util.h

index 3d37c373b0aee49177c5a55397a54ebd8dc98161..fb10eedc0af17fb247841cdd3e04bc08f6536b84 100644 (file)
@@ -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 ();
 }
index 5afb978b79b5ceef5b1364107dffc3934280680c..dcf1377388eb6466e8801f3953246fb25495e35e 100644 (file)
@@ -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);