summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-24 18:18:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-24 18:18:41 +0300
commiteb6bcc71e126d3335e7db3a18049ec448574ef16 (patch)
tree23e0113044850980de69a60037d53be06a21e5ac /protocols/ICQ-WIM/src/server.cpp
parent5406faf1321036ee5ed65a6a926a86d9069fcfe9 (diff)
ICQ-WIM:
- added "Show error popups" options; - fix: errors were not translated
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 8f4e7c621e..47ef4bf077 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -126,25 +126,27 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode)
{
debugLogA("ConnectionFailed -> reason %d", iReason);
- POPUPDATAW Popup = {};
- Popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true);
- wcscpy_s(Popup.lpwzContactName, m_tszUserName);
- switch (iReason) {
- case LOGINERR_BADUSERID:
- 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.lpwzText, LPGENW("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode);
- break;
- case LOGINERR_NONETWORK:
- case LOGINERR_NOSERVER:
- mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode);
- break;
- default:
- mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nUnknown error during sign on: %d"), iErrorCode);
- break;
+ if (m_bErrorPopups) {
+ POPUPDATAW Popup = {};
+ Popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true);
+ wcscpy_s(Popup.lpwzContactName, m_tszUserName);
+ switch (iReason) {
+ case LOGINERR_BADUSERID:
+ mir_snwprintf(Popup.lpwzText, TranslateT("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again."));
+ break;
+ case LOGINERR_WRONGPASSWORD:
+ mir_snwprintf(Popup.lpwzText, TranslateT("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode);
+ break;
+ case LOGINERR_NONETWORK:
+ case LOGINERR_NOSERVER:
+ mir_snwprintf(Popup.lpwzText, TranslateT("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode);
+ break;
+ default:
+ mir_snwprintf(Popup.lpwzText, TranslateT("Connection failed.\nUnknown error during sign on: %d"), iErrorCode);
+ break;
+ }
+ PUAddPopupW(&Popup);
}
- PUAddPopupW(&Popup);
ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason);
ShutdownSession();