| 374 | } |
| 375 | |
| 376 | void UserInterfaceModule::HandleNotificationMessage(radiant::NotificationMessage& msg) |
| 377 | { |
| 378 | auto parentWindow = module::GlobalModuleRegistry().moduleExists(MODULE_MAINFRAME) ? |
| 379 | GlobalMainFrame().getWxTopLevelWindow() : nullptr; |
| 380 | |
| 381 | switch (msg.getType()) |
| 382 | { |
| 383 | case radiant::NotificationMessage::Information: |
| 384 | wxutil::Messagebox::Show(msg.hasTitle() ? msg.getTitle() : _("Notification"), |
| 385 | msg.getMessage(), IDialog::MessageType::MESSAGE_CONFIRM, parentWindow); |
| 386 | break; |
| 387 | |
| 388 | case radiant::NotificationMessage::Warning: |
| 389 | wxutil::Messagebox::Show(msg.hasTitle() ? msg.getTitle() : _("Warning"), |
| 390 | msg.getMessage(), IDialog::MessageType::MESSAGE_WARNING, parentWindow); |
| 391 | break; |
| 392 | |
| 393 | case radiant::NotificationMessage::Error: |
| 394 | wxutil::Messagebox::Show(msg.hasTitle() ? msg.getTitle() : _("Error"), |
| 395 | msg.getMessage(), IDialog::MessageType::MESSAGE_ERROR, parentWindow); |
| 396 | break; |
| 397 | }; |
| 398 | } |
| 399 | |
| 400 | void UserInterfaceModule::onDispatchEvent(DispatchEvent& evt) |
| 401 | { |
nothing calls this directly
no test coverage detected