summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-27 12:43:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-27 12:43:20 +0300
commit423be683866fd8e305457eb725d8cdbe1f297fbd (patch)
treec49a7bdaf7f08683b9bfae48f0250050b2bf1872 /plugins/WhenWasIt
parent288a07c81370226937d882b7a14fe3b6e3607e9e (diff)
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp2
-rw-r--r--plugins/WhenWasIt/src/notifiers.cpp32
-rw-r--r--plugins/WhenWasIt/src/services.cpp8
3 files changed, 21 insertions, 21 deletions
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index e2ff236ad5..af551c5107 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -217,7 +217,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
CheckDlgButton(hWnd, IDC_USE_DIALOG, (commonData.bUseDialog) ? BST_CHECKED : BST_UNCHECKED);
EnableDialogGroup(hWnd, commonData.bUseDialog);
- if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
CheckDlgButton(hWnd, IDC_USE_POPUPS, commonData.bUsePopups ? BST_CHECKED : BST_UNCHECKED);
EnablePopupsGroup(hWnd, commonData.bUsePopups);
}
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp
index ca672632c0..dfbf5d9d59 100644
--- a/plugins/WhenWasIt/src/notifiers.cpp
+++ b/plugins/WhenWasIt/src/notifiers.cpp
@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-void FillPopupData(POPUPDATAT &pd, int dtb)
+void FillPopupData(POPUPDATAW &pd, int dtb)
{
int popupTimeout = (dtb == 0) ? commonData.popupTimeoutToday : commonData.popupTimeout;
@@ -31,13 +31,13 @@ void FillPopupData(POPUPDATAT &pd, int dtb)
void PopupNotifyNoBirthdays()
{
- POPUPDATAT pd = { 0 };
+ POPUPDATAW pd = { 0 };
FillPopupData(pd, -1);
pd.lchIcon = GetDTBIcon(-1);
- wcsncpy(pd.lptzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1);
- wcsncpy(pd.lptzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1);
- PUAddPopupT(&pd);
+ wcsncpy(pd.lpwzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1);
+ wcsncpy(pd.lpwzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1);
+ PUAddPopupW(&pd);
}
wchar_t *BuildDTBText(int dtb, wchar_t *name, wchar_t *text, int size)
@@ -75,13 +75,13 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
BuildDTBText(dtb, name, text, _countof(text));
int gender = GetContactGender(hContact);
- POPUPDATAT pd = { 0 };
+ POPUPDATAW pd = { 0 };
FillPopupData(pd, dtb);
pd.lchContact = hContact;
pd.PluginWindowProc = DlgProcPopup;
pd.lchIcon = GetDTBIcon(dtb);
- mir_snwprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
+ mir_snwprintf(pd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
wchar_t *sex;
switch (toupper(gender)) {
case 'M':
@@ -96,14 +96,14 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
}
if (age > 0) {
if (dtb > 0)
- mir_snwprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age);
+ mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age);
else
- mir_snwprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
}
else
- mir_wstrncpy(pd.lptzText, text, MAX_SECONDLINE - 1);
+ mir_wstrncpy(pd.lpwzText, text, MAX_SECONDLINE - 1);
- PUAddPopupT(&pd);
+ PUAddPopupW(&pd);
return 0;
}
@@ -119,13 +119,13 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
BuildDABText(dab, name, text, _countof(text));
int gender = GetContactGender(hContact);
- POPUPDATAT pd = { 0 };
+ POPUPDATAW pd = { 0 };
FillPopupData(pd, dab);
pd.lchContact = hContact;
pd.PluginWindowProc = DlgProcPopup;
pd.lchIcon = GetDTBIcon(dab);
- mir_snwprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
+ mir_snwprintf(pd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
wchar_t *sex;
switch (toupper(gender)) {
case 'M':
@@ -139,11 +139,11 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
break;
}
if (age > 0)
- mir_snwprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
else
- mir_wstrncpy(pd.lptzText, text, MAX_SECONDLINE - 1);
+ mir_wstrncpy(pd.lpwzText, text, MAX_SECONDLINE - 1);
- PUAddPopupT(&pd);
+ PUAddPopupW(&pd);
return 0;
}
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index b0dfe5c516..3e5c89eee5 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -156,13 +156,13 @@ INT_PTR AddBirthdayService(WPARAM hContact, LPARAM)
void ShowPopupMessage(const wchar_t *title, const wchar_t *message, HANDLE icon)
{
- POPUPDATAT pd = { 0 };
+ POPUPDATAW pd = { 0 };
pd.lchIcon = IcoLib_GetIconByHandle(icon);
- wcsncpy_s(pd.lptzContactName, title, _TRUNCATE);
- wcsncpy_s(pd.lptzText, message, _TRUNCATE);
+ wcsncpy_s(pd.lpwzContactName, title, _TRUNCATE);
+ wcsncpy_s(pd.lpwzText, message, _TRUNCATE);
pd.colorText = commonData.foreground;
pd.colorBack = commonData.background;
- PUAddPopupT(&pd);
+ PUAddPopupW(&pd);
}
void __cdecl RefreshUserDetailsWorkerThread(void*)