return m;
}
+wxStaticText *
+add_label_to_grid_bag_sizer (wxGridBagSizer* s, wxWindow* p, wxString t, wxGBPosition pos, wxGBSpan span)
+{
+ wxStaticText* m = new wxStaticText (p, wxID_ANY, t);
+ s->Add (m, pos, span, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+ return m;
+}
+
/** Pop up an error dialogue box.
* @param parent Parent.
* @param m Message.
void
error_dialog (wxWindow* parent, wxString m)
{
- wxMessageDialog* d = new wxMessageDialog (parent, m, _("DVD-o-matic"), wxOK);
+ wxMessageDialog* d = new wxMessageDialog (parent, m, _("DCP-o-matic"), wxOK);
d->ShowModal ();
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.
*/
}
}
+void
+checked_set (wxStaticText* widget, string value)
+{
+ if (widget->GetLabel() != std_to_wx (value)) {
+ widget->SetLabel (std_to_wx (value));
+ }
+}
+
void
checked_set (wxCheckBox* widget, bool value)
{