MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / OpenOk

Method OpenOk

NetStream/source/dialog.cpp:75–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void 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
95void dialog::OpenError(Plugin *workPlugin, int32_t errorCode, const wchar_t *messageText)
96{

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected