diff options
Diffstat (limited to 'src/modules/srawaymsg')
-rw-r--r-- | src/modules/srawaymsg/awaymsg.cpp | 4 | ||||
-rw-r--r-- | src/modules/srawaymsg/sendmsg.cpp | 10 |
2 files changed, 6 insertions, 8 deletions
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;
}
|