| 15 | #include "wxArrayStringEx.h" |
| 16 | |
| 17 | int AudacityMessageBox(const TranslatableString& message, |
| 18 | const TranslatableString& caption, |
| 19 | long style, wxWindow *parent, int x, int y) |
| 20 | { |
| 21 | // wxMessageBox is implemented with native message boxes and does not |
| 22 | // use the wxWidgets message machinery. Therefore the wxEventFilter that |
| 23 | // most journal recording relies on fails us here. So if replaying, don't |
| 24 | // really make the modal dialog, but just return the expected value. |
| 25 | return Journal::IfNotPlaying( L"MessageBox", [&]{ |
| 26 | return ::wxMessageBox( |
| 27 | message.Translation(), caption.Translation(), |
| 28 | style, parent, x, y); |
| 29 | } ); |
| 30 | } |