aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-03 20:51:23 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-03 21:39:06 +0200
commit32bb4696396e48521614d00e5b8f6e6586822f31 (patch)
tree1c5bd8e5d1a3f549b0a84159b66af472e6aff178 /c/main.cpp
parentdee3a413f072e5779fc5ba80692f895ba43815c6 (diff)
downloadEpisodeBrowser-32bb4696396e48521614d00e5b8f6e6586822f31.tar.gz
Minor improvements.
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/c/main.cpp b/c/main.cpp
index 79fb8eb..87b15be 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -67,16 +67,17 @@ void OnTerminate() noexcept
try { why = PlString(t); } catch (...) {}
} catch (const Win32Error& e) {
what = L"a Windows error";
- try { why = wchar_ptr::copy(e.WhatW()); } catch (...) {}
+ try { why = wchar_ptr::copy(e.What()); } catch (...) {}
} catch (const std::exception& e) {
try { why = wchar_ptr::from_narrow(e.what()); } catch (...) {}
} catch (...) {}
wchar_t msg[256] = {0};
if (why)
- wszf(msg, L"Episode Browser was terminated due to %s: %s", what, static_cast<wchar_t*>(why));
+ Swprintf(msg, L"Episode Browser was terminated due to %s: %s",
+ what, static_cast<wchar_t*>(why));
else
- wszf(msg, L"Episode Browser was terminated due to %s.", what);
+ Swprintf(msg, L"Episode Browser was terminated due to %s.", what);
MessageBox(g_hWnd, msg, L"Fatal Error", MB_ICONERROR);
_Exit(1);
@@ -485,7 +486,7 @@ void HandleContextMenu(const HWND, unsigned short command)
L"Error", MB_ICONWARNING);
} else if (cNotFound) {
wchar_t msg[64] = {0};
- wszf(msg, L"%d episodes could not be opened locally.", cNotFound);
+ Swprintf(msg, L"%d episodes could not be opened locally.", cNotFound);
EBMessageBox(msg, L"Error", MB_ICONWARNING);
} else if (ID_SUBGROUP(command) == IDG_CTX_RATE) {
g_elv->Sort();
@@ -503,7 +504,7 @@ void WaitFor(const char* mod, const char* pred)
if (bActive) {
wchar_t msg[256] = {0};
- wszf(msg, L"Another task (%s) is active. "
+ 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));
if (EBMessageBox(msg, L"Error", MB_YESNO|MB_ICONWARNING) != IDYES)