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 /plugins/BuddyExpectator | |
parent | 288a07c81370226937d882b7a14fe3b6e3607e9e (diff) |
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/BuddyExpectator')
-rw-r--r-- | plugins/BuddyExpectator/src/BuddyExpectator.cpp | 32 | ||||
-rw-r--r-- | plugins/BuddyExpectator/src/options.cpp | 16 |
2 files changed, 24 insertions, 24 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 9baeda0297..03e7537982 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -224,13 +224,13 @@ bool isContactGoneFor(MCONTACT hContact, int days) if (options.hideInactive)
if (daysSinceMessage >= options.iSilencePeriod)
if (!db_get_b(hContact, "CList", "Hidden", 0) && !g_plugin.getByte(hContact, "NeverHide", 0)) {
- POPUPDATAT_V2 ppd = { 0 };
+ POPUPDATAW_V2 ppd = { 0 };
ppd.cbSize = sizeof(ppd);
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- mir_snwprintf(ppd.lptzContactName, TranslateT("Hiding %s (%S)"), Clist_GetContactDisplayName(hContact), GetContactProto(hContact));
- mir_snwprintf(ppd.lptzText, TranslateT("%d days since last message"), daysSinceMessage);
+ mir_snwprintf(ppd.lpwzContactName, TranslateT("Hiding %s (%S)"), Clist_GetContactDisplayName(hContact), GetContactProto(hContact));
+ mir_snwprintf(ppd.lpwzText, TranslateT("%d days since last message"), daysSinceMessage);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -243,7 +243,7 @@ bool isContactGoneFor(MCONTACT hContact, int days) ppd.lpActions = hideactions;
ppd.actionCount = 2;
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA);
+ CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA);
Skin_PlaySound("buddyExpectatorHide");
}
@@ -260,11 +260,11 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message) if (options.iShowPopup > 0) {
// Display Popup
- POPUPDATAT ppd = { 0 };
+ POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
- wcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
+ wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
ppd.colorText = options.iPopupColorFore;
@@ -272,7 +272,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message) ppd.PluginWindowProc = PopupDlgProc;
ppd.PluginData = nullptr;
ppd.iSeconds = options.iPopupDelay;
- PUAddPopupT(&ppd);
+ PUAddPopupW(&ppd);
}
if (options.iShowEvent > 0) {
@@ -297,11 +297,11 @@ void GoneNotify(MCONTACT hContact, wchar_t *message) if (options.iShowPopup2 > 0) {
// Display Popup
- POPUPDATAT ppd = { 0 };
+ POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
- wcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
+ wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
ppd.colorText = options.iPopupColorFore;
@@ -310,7 +310,7 @@ void GoneNotify(MCONTACT hContact, wchar_t *message) ppd.PluginData = nullptr;
ppd.iSeconds = options.iPopupDelay;
- PUAddPopupT(&ppd);
+ PUAddPopupW(&ppd);
}
if (options.iShowEvent2 > 0) {
@@ -478,13 +478,13 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) if (prevStatus == ID_STATUS_OFFLINE) {
if (g_plugin.getByte(hContact, "MissYou", 0)) {
// Display Popup
- POPUPDATAT_V2 ppd = { 0 };
+ POPUPDATAW_V2 ppd = { 0 };
ppd.cbSize = sizeof(ppd);
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
- wcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
+ wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
ppd.colorText = options.iPopupColorFore;
@@ -497,7 +497,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) ppd.lpActions = missyouactions;
ppd.actionCount = 1;
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA);
+ CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA);
Skin_PlaySound("buddyExpectatorMissYou");
}
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index 6296fd7b34..48d768140b 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -94,7 +94,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- if (!ServiceExists(MS_POPUP_ADDPOPUPT))
+ if (!ServiceExists(MS_POPUP_ADDPOPUPW))
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_POPUP), FALSE);
//iAbsencePeriod
@@ -313,7 +313,7 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP case WM_COMMAND:
if (LOWORD(wParam) == IDC_PREVIEW) {
- POPUPDATAT ppd;
+ POPUPDATAW ppd;
memset(&ppd, 0, sizeof(ppd));
//iPopupDelay
@@ -325,10 +325,10 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP ppd.lchContact = NULL;
ppd.lchIcon = hIcon;
- wcsncpy(ppd.lptzContactName, TranslateT("Contact name"), MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzContactName, TranslateT("Contact name"), MAX_CONTACTNAME);
wchar_t szPreviewText[250];
mir_snwprintf(szPreviewText, TranslateT("has returned after being absent since %d days"), rand() % 30);
- wcsncpy(ppd.lptzText, szPreviewText, MAX_SECONDLINE);
+ wcsncpy(ppd.lpwzText, szPreviewText, MAX_SECONDLINE);
// Get current popups colors options
if (IsDlgButtonChecked(hwndDlg, IDC_COLORS_POPUP))
@@ -344,12 +344,12 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP ppd.PluginData = nullptr;
ppd.iSeconds = options.iPopupDelay;
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NO_HISTORY);
+ CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NO_HISTORY);
- wcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
+ wcsncpy(ppd.lpwzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NO_HISTORY);
+ CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NO_HISTORY);
}
else {
if ((HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == CBN_SELCHANGE) || ((HIWORD(wParam) == EN_CHANGE) && !ChangeLock))
@@ -439,7 +439,7 @@ int OptionsInit(WPARAM wParam, LPARAM) odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
g_plugin.addOptions(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
odp.szGroup.w = LPGENW("Popups");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPPANEL);
odp.pfnDlgProc = PopupOptionsFrameProc;
|