diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-27 12:43:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-27 12:43:20 +0300 |
commit | 423be683866fd8e305457eb725d8cdbe1f297fbd (patch) | |
tree | c49a7bdaf7f08683b9bfae48f0250050b2bf1872 /protocols/ICQ-WIM/src | |
parent | 288a07c81370226937d882b7a14fe3b6e3607e9e (diff) |
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r-- | protocols/ICQ-WIM/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/poll.cpp | 10 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 1 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 14 |
4 files changed, 14 insertions, 13 deletions
diff --git a/protocols/ICQ-WIM/src/main.cpp b/protocols/ICQ-WIM/src/main.cpp index aaaacf0ea3..21232e7d25 100644 --- a/protocols/ICQ-WIM/src/main.cpp +++ b/protocols/ICQ-WIM/src/main.cpp @@ -96,7 +96,7 @@ static INT_PTR ICQPermitDeny(WPARAM hContact, LPARAM, LPARAM bAllow) static int ModuleLoad(WPARAM, LPARAM) { g_bSecureIM = ServiceExists("SecureIM/IsContactSecured"); - g_bPopupService = ServiceExists(MS_POPUP_ADDPOPUPT); + g_bPopupService = ServiceExists(MS_POPUP_ADDPOPUPW); g_bMessageState = ServiceExists(MS_MESSAGESTATE_UPDATE); return 0; } diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index cc3cb81027..25d34b5e8d 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -224,15 +224,15 @@ void CIcqProto::ProcessNotification(const JSONNode &ev) CMStringW wszSubj((*root)["subject"].as_mstring()); m_unreadEmails = (*root)["unreadCount"].as_int(); - POPUPDATAT Popup = {}; - mir_snwprintf(Popup.lptzText, LPGENW("You received e-mail from %s: %s"), wszFrom.c_str(), wszSubj.c_str()); + POPUPDATAW Popup = {}; + mir_snwprintf(Popup.lpwzText, LPGENW("You received e-mail from %s: %s"), wszFrom.c_str(), wszSubj.c_str()); Popup.lchIcon = IcoLib_GetIconByHandle(iconList[1].hIcolib); if (g_bPopupService) { - wcsncpy_s(Popup.lptzContactName, m_tszUserName, _TRUNCATE); - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&Popup, 0); + wcsncpy_s(Popup.lpwzContactName, m_tszUserName, _TRUNCATE); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&Popup, 0); } - EmailNotification(Popup.lptzText); + EmailNotification(Popup.lpwzText); } const JSONNode &status = fld["mailbox.status"]; diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index d4d8ea7d1d..b587c1976f 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -196,6 +196,7 @@ INT_PTR CIcqProto::GetEmailCount(WPARAM, LPARAM) INT_PTR CIcqProto::GotoInbox(WPARAM, LPARAM) { + Utils_OpenUrl("https://e.mail.ru/messages/inbox"); return 0; } diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 6567e8a390..f33d22eb1d 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -127,26 +127,26 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode) debugLogA("ConnectionFailed -> reason %d", iReason); if (g_bPopupService) { - POPUPDATAT Popup = {}; + POPUPDATAW Popup = {}; Popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true); - wcscpy_s(Popup.lptzContactName, m_tszUserName); + wcscpy_s(Popup.lpwzContactName, m_tszUserName); switch (iReason) { case LOGINERR_BADUSERID: - mir_snwprintf(Popup.lptzText, LPGENW("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again.")); + mir_snwprintf(Popup.lpwzText, LPGENW("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again.")); break; case LOGINERR_WRONGPASSWORD: - mir_snwprintf(Popup.lptzText, LPGENW("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode); + mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode); break; case LOGINERR_NONETWORK: case LOGINERR_NOSERVER: - mir_snwprintf(Popup.lptzText, LPGENW("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode); + mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode); break; default: - mir_snwprintf(Popup.lptzText, LPGENW("Connection failed.\nUnknown error during sign on: %d"), iErrorCode); + mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nUnknown error during sign on: %d"), iErrorCode); break; } - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&Popup, 0); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&Popup, 0); } ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason); |