diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/main.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -534,20 +534,20 @@ void WaitFor(const char* mod, const char* pred) /* WaitFor uses a thread on the Prolog side to execute a * predicate asynchronously. */ - static WcharPtr activePred; + static WcharPtr predActive; static UINT_PTR iTimer; static atom_t aThread; - if (activePred) { + if (predActive) { wchar_t msg[256] = {0}; Swprintf(msg, L"Another task (%s) is active. " L"Do you want to cancel the existing task and start a new one?", - static_cast<wchar_t*>(activePred)); + static_cast<wchar_t*>(predActive)); if (EBMessageBox(msg, L"Error", MB_YESNO|MB_ICONWARNING) != IDYES) return; KillTimer(nullptr, iTimer); - activePred = nullptr; + predActive = nullptr; g_elv->Update(); } @@ -566,7 +566,7 @@ void WaitFor(const char* mod, const char* pred) } else { KillTimer(nullptr, iTimer); i = 0; - activePred = nullptr; + predActive = nullptr; g_elv->Update(); } }; @@ -574,7 +574,7 @@ void WaitFor(const char* mod, const char* pred) Plx(mod,"thread_create",pred,&aThread); SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), reinterpret_cast<LPARAM>(L".")); if (Prefer(iTimer = SetTimer(nullptr, -1, 500, proc))) - activePred = WcharPtr::FromNarrow(pred); + predActive = WcharPtr::FromNarrow(pred); } INT_PTR CALLBACK AboutDlgProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, const LPARAM) @@ -585,11 +585,8 @@ INT_PTR CALLBACK AboutDlgProc(const HWND hWnd, const UINT uMsg, const WPARAM wPa return TRUE; case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: + if (LOWORD(wParam) == IDOK) EndDialog(hWnd, IDOK); - break; - } return TRUE; default: @@ -599,8 +596,9 @@ INT_PTR CALLBACK AboutDlgProc(const HWND hWnd, const UINT uMsg, const WPARAM wPa void UpdateTheme() { - if (!IsThemeActive) return; - const bool bThemeActive = IsThemeActive(); - g_dlv->UpdateTheme(bThemeActive); - g_elv->UpdateTheme(bThemeActive); + if (IsThemeActive) { + const bool bThemeActive = IsThemeActive(); + g_dlv->UpdateTheme(bThemeActive); + g_elv->UpdateTheme(bThemeActive); + } } |