diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 8 | ||||
-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 | ||||
-rw-r--r-- | protocols/Sametime/src/options.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_utils.cpp | 6 | ||||
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 6 | ||||
-rw-r--r-- | protocols/Twitter/src/connection.cpp | 10 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.cpp | 26 | ||||
-rw-r--r-- | protocols/Twitter/src/ui.cpp | 8 |
11 files changed, 47 insertions, 46 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 9541b1d3a5..705e1ae521 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -325,8 +325,8 @@ void FacebookProto::LoadHistory(void *pParam) pd.iSeconds = 5; pd.lchContact = hContact; pd.lchIcon = IcoLib_GetIconByHandle(GetIconHandle("conversation")); // TODO: Use better icon - wcsncpy(pd.lptzContactName, m_tszUserName, MAX_CONTACTNAME); - wcsncpy(pd.lptzText, TranslateT("Loading history started."), MAX_SECONDLINE); + wcsncpy(pd.lpwzContactName, m_tszUserName, MAX_CONTACTNAME); + wcsncpy(pd.lpwzText, TranslateT("Loading history started."), MAX_SECONDLINE); HWND popupHwnd = nullptr; if (ServiceExists(MS_POPUP_ADDPOPUPW)) { @@ -413,7 +413,7 @@ void FacebookProto::LoadHistory(void *pParam) PUChangeTextW(popupHwnd, text); } else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - wcsncpy(pd.lptzText, text, MAX_SECONDLINE); + wcsncpy(pd.lpwzText, text, MAX_SECONDLINE); pd.iSeconds = 1; popupHwnd = (HWND)CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, (LPARAM)0); } @@ -435,7 +435,7 @@ void FacebookProto::LoadHistory(void *pParam) PUChangeTextW(popupHwnd, TranslateT("Loading history completed.")); else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { pd.iSeconds = 5; - wcsncpy(pd.lptzText, TranslateT("Loading history completed."), MAX_SECONDLINE); + wcsncpy(pd.lpwzText, TranslateT("Loading history completed."), MAX_SECONDLINE); popupHwnd = (HWND)CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, (LPARAM)0); } } 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); diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp index aec8816c18..505a4d6538 100644 --- a/protocols/Sametime/src/options.cpp +++ b/protocols/Sametime/src/options.cpp @@ -160,7 +160,7 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA }
- if (!ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (!ServiceExists(MS_POPUP_ADDPOPUPW)) {
HWND hw = GetDlgItem(hwndDlg, IDC_RAD_ERRPOP);
EnableWindow(hw, FALSE);
}
diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index bdc714877f..3ddab742f8 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -51,15 +51,15 @@ void CSteamProto::ShowNotification(const wchar_t *caption, const wchar_t *messag if (Miranda_IsTerminated())
return;
- if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1))
+ if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1))
{
- POPUPDATAT ppd = { 0 };
+ POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact;
wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME);
wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
ppd.lchIcon = IcoLib_GetIcon(MODULE"_main");
- if (!PUAddPopupT(&ppd))
+ if (!PUAddPopupW(&ppd))
return;
}
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 8e80c3bda9..3a80c48044 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -104,14 +104,14 @@ void CToxProto::ShowNotification(const wchar_t *caption, const wchar_t *message, return;
}
- if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
- POPUPDATAT ppd = { 0 };
+ if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
+ POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact;
wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME);
wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
ppd.lchIcon = IcoLib_GetIcon("Tox_main");
- if (!PUAddPopupT(&ppd))
+ if (!PUAddPopupW(&ppd))
return;
}
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 901f6994ca..195fca892f 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -484,11 +484,11 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, const std::string *url)
{
- if (!ServiceExists(MS_POPUP_ADDPOPUPT) || getByte(TWITTER_KEY_POPUP_SHOW) == 0) {
+ if (!ServiceExists(MS_POPUP_ADDPOPUPW) || getByte(TWITTER_KEY_POPUP_SHOW) == 0) {
return;
}
- POPUPDATAT popup = {};
+ POPUPDATAW popup = {};
popup.lchContact = hContact;
popup.iSeconds = getDword(TWITTER_KEY_POPUP_TIMEOUT);
@@ -501,7 +501,7 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, DBVARIANT dbv;
if (!db_get_ws(hContact, "CList", "MyHandle", &dbv) || !getWString(hContact, TWITTER_KEY_UN, &dbv)) {
- wcsncpy(popup.lptzContactName, dbv.pwszVal, MAX_CONTACTNAME);
+ wcsncpy(popup.lpwzContactName, dbv.pwszVal, MAX_CONTACTNAME);
db_free(&dbv);
}
@@ -510,8 +510,8 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, popup.PluginData = (void *)url;
}
- mbcs_to_tcs(CP_UTF8, text.c_str(), popup.lptzText, MAX_SECONDLINE);
- PUAddPopupT(&popup);
+ mbcs_to_tcs(CP_UTF8, text.c_str(), popup.lpwzText, MAX_SECONDLINE);
+ PUAddPopupW(&popup);
}
void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg)
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 7ad53590e0..2664441c12 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -279,7 +279,7 @@ int TwitterProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.pfnDlgProc = options_proc;
g_plugin.addOptions(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
odp.szTab.w = LPGENW("Popups");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS);
odp.pfnDlgProc = popup_options_proc;
@@ -335,9 +335,9 @@ int TwitterProto::ShowPinDialog() void TwitterProto::ShowPopup(const wchar_t *text, int Error)
{
- POPUPDATAT popup = {};
- mir_snwprintf(popup.lptzContactName, TranslateT("%s Protocol"), m_tszUserName);
- wcsncpy_s(popup.lptzText, text, _TRUNCATE);
+ POPUPDATAW popup = {};
+ mir_snwprintf(popup.lpwzContactName, TranslateT("%s Protocol"), m_tszUserName);
+ wcsncpy_s(popup.lpwzText, text, _TRUNCATE);
if (Error) {
popup.iSeconds = -1;
@@ -345,27 +345,27 @@ void TwitterProto::ShowPopup(const wchar_t *text, int Error) popup.colorText = 0x00FFFFFF;
}
- if (ServiceExists(MS_POPUP_ADDPOPUPT))
- PUAddPopupT(&popup);
+ if (ServiceExists(MS_POPUP_ADDPOPUPW))
+ PUAddPopupW(&popup);
else
- MessageBox(nullptr, popup.lptzText, popup.lptzContactName, 0);
+ MessageBox(nullptr, popup.lpwzText, popup.lpwzContactName, 0);
}
void TwitterProto::ShowPopup(const char *text, int Error)
{
- POPUPDATAT popup = {};
- mir_snwprintf(popup.lptzContactName, TranslateT("%s Protocol"), m_tszUserName);
- mbcs_to_tcs(CP_UTF8, text, popup.lptzText, _countof(popup.lptzText));
+ POPUPDATAW popup = {};
+ mir_snwprintf(popup.lpwzContactName, TranslateT("%s Protocol"), m_tszUserName);
+ mbcs_to_tcs(CP_UTF8, text, popup.lpwzText, _countof(popup.lpwzText));
if (Error) {
popup.iSeconds = -1;
popup.colorBack = 0x000000FF;
popup.colorText = 0x00FFFFFF;
}
- if (ServiceExists(MS_POPUP_ADDPOPUPT))
- PUAddPopupT(&popup);
+ if (ServiceExists(MS_POPUP_ADDPOPUPW))
+ PUAddPopupW(&popup);
else
- MessageBox(nullptr, popup.lptzText, popup.lptzContactName, 0);
+ MessageBox(nullptr, popup.lpwzText, popup.lpwzContactName, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index 65fde0c17c..c4d4e50a39 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -314,7 +314,7 @@ namespace popup_options static void preview(HWND hwndDlg)
{
- POPUPDATAT popup = {};
+ POPUPDATAW popup = {};
// Pick a random contact
MCONTACT hContact = 0;
@@ -328,15 +328,15 @@ namespace popup_options // Pick a random quote
int q = rand() % _countof(quotes);
- wcsncpy(popup.lptzContactName, quotes[q].name, MAX_CONTACTNAME);
- wcsncpy(popup.lptzText, quotes[q].text, MAX_SECONDLINE);
+ wcsncpy(popup.lpwzContactName, quotes[q].name, MAX_CONTACTNAME);
+ wcsncpy(popup.lpwzText, quotes[q].text, MAX_SECONDLINE);
popup.lchContact = hContact;
popup.iSeconds = get_timeout(hwndDlg);
popup.colorText = get_text_color(hwndDlg, false);
popup.colorBack = get_back_color(hwndDlg, false);
- PUAddPopupT(&popup);
+ PUAddPopupW(&popup);
}
}
|