| 73 | } |
| 74 | |
| 75 | void dialog::OpenOk(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText) |
| 76 | { |
| 77 | if (s_currentDialog != CURRENT_DIALOG_NONE) |
| 78 | return; |
| 79 | |
| 80 | bool isMainThread = thread::ThreadIDCache::Check(); |
| 81 | |
| 82 | paf::wstring title = titleText; |
| 83 | paf::wstring message = messageText; |
| 84 | |
| 85 | if (!isMainThread) |
| 86 | thread::RMutex::MainThreadMutex()->Lock(); |
| 87 | |
| 88 | s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &CommonGuiDialog::Param::s_dialogOk, CommonGuiEventHandler, NULL); |
| 89 | s_currentPlugin = workPlugin; |
| 90 | |
| 91 | if (!isMainThread) |
| 92 | thread::RMutex::MainThreadMutex()->Unlock(); |
| 93 | } |
| 94 | |
| 95 | void dialog::OpenError(Plugin *workPlugin, int32_t errorCode, const wchar_t *messageText) |
| 96 | { |