From a4d719c726e619d6517252c88b04c076565d87ba Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 18 Feb 2017 13:54:02 -0600 Subject: [PATCH] Refactoring --- SiaDrive/SiaDriveDlg.cpp | 6 +++--- SiaDrive/SiaDriveDlg.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SiaDrive/SiaDriveDlg.cpp b/SiaDrive/SiaDriveDlg.cpp index 25900ca..1403d7e 100644 --- a/SiaDrive/SiaDriveDlg.cpp +++ b/SiaDrive/SiaDriveDlg.cpp @@ -321,7 +321,7 @@ HRESULT CSiaDriveDlg::OnButtonUnlockWallet(IHTMLElement* /*pElement*/) std::thread th([this, pwd]() { if (ApiSuccess(_siaApi->GetWallet()->Unlock(pwd))) { - QueueUiAction([this]() { + ExecuteUiAction([this]() { SetWalletUnlockPassword(L""); SetBodyEnabled(true); ReloadDisplay(); @@ -329,7 +329,7 @@ HRESULT CSiaDriveDlg::OnButtonUnlockWallet(IHTMLElement* /*pElement*/) } else { - QueueUiAction([this]() { + ExecuteUiAction([this]() { SetWalletUnlockPassword(L""); AfxMessageBox(L"Invalid password entered"); SetBodyEnabled(true); @@ -520,7 +520,7 @@ void CSiaDriveDlg::OnTimer(UINT_PTR nIDEvent) } } -void CSiaDriveDlg::QueueUiAction(std::function fn) +void CSiaDriveDlg::ExecuteUiAction(std::function fn) { if (GetCurrentThreadId() == _uiThreadId) { diff --git a/SiaDrive/SiaDriveDlg.h b/SiaDrive/SiaDriveDlg.h index 1164bf7..fea9b4f 100644 --- a/SiaDrive/SiaDriveDlg.h +++ b/SiaDrive/SiaDriveDlg.h @@ -84,7 +84,7 @@ private: void SetRenterUsedFunds(const SiaCurrency& currency); void SetRenterHosts(const std::uint64_t& hosts); void SetRenterTotalUsed(const std::uint64_t& bytes); - void QueueUiAction(std::function action); + void ExecuteUiAction(std::function action); void ProcessUiActionQueue(); void ClearDisplay();