From 4aa6229698b946e52ce19018aaf13f8b92fb168e Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Fri, 15 Jun 2012 14:13:45 +0000 Subject: another portion of "#ifsef Unicode" removal git-svn-id: http://svn.miranda-ng.org/main/trunk@426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/srawaymsg/awaymsg.cpp | 4 ++-- src/modules/srawaymsg/sendmsg.cpp | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/modules/srawaymsg') diff --git a/src/modules/srawaymsg/awaymsg.cpp b/src/modules/srawaymsg/awaymsg.cpp index f1c8bbc46e..d4435f8e3c 100644 --- a/src/modules/srawaymsg/awaymsg.cpp +++ b/src/modules/srawaymsg/awaymsg.cpp @@ -85,7 +85,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP if (ack->result != ACKRESULT_SUCCESS) break; if (dat->hAwayMsgEvent && ack->hProcess == dat->hSeq) { UnhookEvent(dat->hAwayMsgEvent); dat->hAwayMsgEvent = NULL; } -#ifdef _UNICODE + DBVARIANT dbv; bool unicode = !DBGetContactSetting(dat->hContact, "CList", "StatusMsg", &dbv) && (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR); @@ -96,7 +96,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SetDlgItemText(hwndDlg, IDC_MSG, dbv.pwszVal); } else -#endif + SetDlgItemTextA(hwndDlg, IDC_MSG, (const char*)ack->lParam); ShowWindow(GetDlgItem(hwndDlg, IDC_RETRIEVING), SW_HIDE); diff --git a/src/modules/srawaymsg/sendmsg.cpp b/src/modules/srawaymsg/sendmsg.cpp index 015fdce3f8..4c5ceec8ab 100644 --- a/src/modules/srawaymsg/sendmsg.cpp +++ b/src/modules/srawaymsg/sendmsg.cpp @@ -612,7 +612,7 @@ static INT_PTR sttGetAwayMessageT(WPARAM wParam, LPARAM lParam) return (INT_PTR)GetAwayMessage((int)wParam, (char*)lParam); } -#ifdef UNICODE + static INT_PTR sttGetAwayMessage(WPARAM wParam, LPARAM lParam) { TCHAR* msg = GetAwayMessage((int)wParam, (char*)lParam); @@ -620,18 +620,16 @@ static INT_PTR sttGetAwayMessage(WPARAM wParam, LPARAM lParam) mir_free(msg); return (INT_PTR)res; } -#endif + int LoadAwayMessageSending(void) { HookEvent(ME_SYSTEM_MODULESLOADED, AwayMsgSendModulesLoaded); HookEvent(ME_PROTO_ACCLISTCHANGED, AwayMsgSendAccountsChanged); -#ifdef UNICODE + CreateServiceFunction(MS_AWAYMSG_GETSTATUSMSG, sttGetAwayMessage); CreateServiceFunction(MS_AWAYMSG_GETSTATUSMSGW, sttGetAwayMessageT); -#else - CreateServiceFunction(MS_AWAYMSG_GETSTATUSMSG, sttGetAwayMessageT); -#endif + return 0; } -- cgit v1.2.3