From ed4897b7ef69e862806a8c07f1fd475262d0c36e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 24 Jul 2019 20:58:51 +0300 Subject: massive warning fix --- plugins/DbEditorPP/src/copymodule.cpp | 2 +- plugins/DbEditorPP/src/deletemodule.cpp | 2 +- plugins/DbEditorPP/src/main.cpp | 4 ++-- plugins/DbEditorPP/src/watchedvars.cpp | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/DbEditorPP/src') diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index e0adfe2812..00fe3d5ef7 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -28,7 +28,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar mac = (ModuleAndContact *)lParam; wchar_t name[NAME_SIZE], msg[MSG_SIZE]; - mir_snwprintf(msg, TranslateT("Copy module \"%s\""), _A2T(mac->module)); + mir_snwprintf(msg, TranslateT("Copy module \"%s\""), _A2T(mac->module).get()); SetWindowText(hwnd, msg); for (auto &hContact : Contacts()) { diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp index 343aa625da..fadb491816 100644 --- a/plugins/DbEditorPP/src/deletemodule.cpp +++ b/plugins/DbEditorPP/src/deletemodule.cpp @@ -10,7 +10,7 @@ int deleteModule(MCONTACT hContact, const char *module, int confirm) if (confirm && g_plugin.getByte("WarnOnDelete", 1)) { wchar_t text[MSG_SIZE]; - mir_snwprintf(text, TranslateT("Are you sure you want to delete module \"%s\"?"), _A2T(module)); + mir_snwprintf(text, TranslateT("Are you sure you want to delete module \"%s\"?"), _A2T(module).get()); if (dlg(text, MB_YESNO | MB_ICONEXCLAMATION) == IDNO) return 0; } diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index 939a1b554d..af14893ded 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -478,9 +478,9 @@ int GetContactName(MCONTACT hContact, const char *proto, wchar_t *value, int max if (szProto && szProto[0]) { if (g_Order) - mir_snwprintf(value, maxlen, L"(%s) %s", _A2T(szProto), name); + mir_snwprintf(value, maxlen, L"(%S) %s", szProto, name); else - mir_snwprintf(value, maxlen, L"%s (%s)", name, _A2T(szProto)); + mir_snwprintf(value, maxlen, L"%s (%S)", name, szProto); } else mir_wstrncpy(value, name, maxlen); diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index 7cd8ef85b5..c1c10266e5 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -351,7 +351,8 @@ void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting) // 2nd line int type = GetValue(hContact, module, setting, value, _countof(value)); - mir_snwprintf(text, TranslateT("Database Setting Changed: \nModule: \"%s\", Setting: \"%s\"\nNew Value (%s): \"%s\""), _A2T(module), _A2T(setting), DBVType(type), value); + mir_snwprintf(text, TranslateT("Database Setting Changed: \nModule: \"%s\", Setting: \"%s\"\nNew Value (%s): \"%s\""), + _A2T(module).get(), _A2T(setting).get(), DBVType(type), value); POPUPDATAW ppd; ppd.lchContact = (MCONTACT)hContact; -- cgit v1.2.3