summaryrefslogtreecommitdiff
path: root/plugins/Alarms
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/Alarms
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Alarms')
-rw-r--r--plugins/Alarms/src/alarm_win.cpp22
-rw-r--r--plugins/Alarms/src/alarmlist.cpp32
-rw-r--r--plugins/Alarms/src/alarms.cpp4
-rw-r--r--plugins/Alarms/src/frame.cpp22
-rw-r--r--plugins/Alarms/src/options.cpp8
5 files changed, 44 insertions, 44 deletions
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp
index f39333767d..4052bc7f79 100644
--- a/plugins/Alarms/src/alarm_win.cpp
+++ b/plugins/Alarms/src/alarm_win.cpp
@@ -267,7 +267,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
#define AddItem(x) \
mii.wID++; \
mii.dwTypeData = TranslateW(x); \
- mii.cch = ( UINT )mir_tstrlen(mii.dwTypeData); \
+ mii.cch = ( UINT )mir_wstrlen(mii.dwTypeData); \
InsertMenuItem(hMenu, mii.wID, FALSE, &mii);
AddItem(LPGENW("5 mins"));
@@ -350,31 +350,31 @@ int ReloadFonts(WPARAM, LPARAM)
int AlarmWinModulesLoaded(WPARAM, LPARAM)
{
title_font_id.cbSize = sizeof(FontIDT);
- mir_tstrcpy(title_font_id.group, LPGENW("Alarms"));
- mir_tstrcpy(title_font_id.name, LPGENW("Title"));
+ mir_wstrcpy(title_font_id.group, LPGENW("Alarms"));
+ mir_wstrcpy(title_font_id.name, LPGENW("Title"));
mir_strcpy(title_font_id.dbSettingsGroup, MODULE);
mir_strcpy(title_font_id.prefix, "FontTitle");
- mir_tstrcpy(title_font_id.backgroundGroup, LPGENW("Alarms"));
- mir_tstrcpy(title_font_id.backgroundName, LPGENW("Background"));
+ mir_wstrcpy(title_font_id.backgroundGroup, LPGENW("Alarms"));
+ mir_wstrcpy(title_font_id.backgroundName, LPGENW("Background"));
title_font_id.flags = 0;
title_font_id.order = 0;
FontRegisterT(&title_font_id);
window_font_id.cbSize = sizeof(FontIDT);
- mir_tstrcpy(window_font_id.group, LPGENW("Alarms"));
- mir_tstrcpy(window_font_id.name, LPGENW("Window"));
+ mir_wstrcpy(window_font_id.group, LPGENW("Alarms"));
+ mir_wstrcpy(window_font_id.name, LPGENW("Window"));
mir_strcpy(window_font_id.dbSettingsGroup, MODULE);
mir_strcpy(window_font_id.prefix, "FontWindow");
- mir_tstrcpy(window_font_id.backgroundGroup, LPGENW("Alarms"));
- mir_tstrcpy(window_font_id.backgroundName, LPGENW("Background"));
+ mir_wstrcpy(window_font_id.backgroundGroup, LPGENW("Alarms"));
+ mir_wstrcpy(window_font_id.backgroundName, LPGENW("Background"));
window_font_id.flags = 0;
window_font_id.order = 1;
FontRegisterT(&window_font_id);
bk_colour_id.cbSize = sizeof(ColourIDT);
mir_strcpy(bk_colour_id.dbSettingsGroup, MODULE);
- mir_tstrcpy(bk_colour_id.group, LPGENW("Alarms"));
- mir_tstrcpy(bk_colour_id.name, LPGENW("Background"));
+ mir_wstrcpy(bk_colour_id.group, LPGENW("Alarms"));
+ mir_wstrcpy(bk_colour_id.name, LPGENW("Background"));
mir_strcpy(bk_colour_id.setting, "BkColour");
bk_colour_id.defcolour = GetSysColor(COLOR_3DFACE);
bk_colour_id.flags = 0;
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index c11ecba568..e108e04132 100644
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -34,10 +34,10 @@ void copy_alarm_data(ALARM *dest, ALARM *src) {
dest->time = src->time;
free_alarm_data(dest);
- dest->szTitle = mir_tstrdup(src->szTitle);
- dest->szDesc = mir_tstrdup(src->szDesc);
- dest->szCommand = mir_tstrdup(src->szCommand);
- dest->szCommandParams = mir_tstrdup(src->szCommandParams);
+ dest->szTitle = mir_wstrdup(src->szTitle);
+ dest->szDesc = mir_wstrdup(src->szDesc);
+ dest->szCommand = mir_wstrdup(src->szCommand);
+ dest->szCommandParams = mir_wstrdup(src->szCommandParams);
}
void GetPluginTime(SYSTEMTIME *t) {
@@ -191,12 +191,12 @@ void LoadAlarms() {
mir_snprintf(buff, "Title%d", i);
if (!db_get_ts(0, MODULE, buff, &dbv)) {
- alarm.szTitle = mir_tstrdup(dbv.ptszVal);
+ alarm.szTitle = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
mir_snprintf(buff, "Desc%d", i);
if (!db_get_ts(0, MODULE, buff, &dbv)) {
- alarm.szDesc = mir_tstrdup(dbv.ptszVal);
+ alarm.szDesc = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
mir_snprintf(buff, "Occ%d", i);
@@ -245,11 +245,11 @@ void LoadAlarms() {
if (alarm.action & AAF_COMMAND) {
mir_snprintf(buff, "ActionCommand%d", i);
if (!db_get_ts(0, MODULE, buff, &dbv)) {
- alarm.szCommand = mir_tstrdup(dbv.ptszVal);
+ alarm.szCommand = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
mir_snprintf(buff, "ActionParams%d", i);
if (!db_get_ts(0, MODULE, buff, &dbv)) {
- alarm.szCommandParams = mir_tstrdup(dbv.ptszVal);
+ alarm.szCommandParams = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
}
@@ -326,10 +326,10 @@ void SaveAlarms() {
mir_snprintf(buff, "ActionFlags%d", index);
db_set_dw(0, MODULE, buff, i->action);
if (i->action & AAF_COMMAND) {
- if (mir_tstrlen(i->szCommand)) {
+ if (mir_wstrlen(i->szCommand)) {
mir_snprintf(buff, "ActionCommand%d", index);
db_set_ts(0, MODULE, buff, i->szCommand);
- if (mir_tstrlen(i->szCommandParams)) {
+ if (mir_wstrlen(i->szCommandParams)) {
mir_snprintf(buff, "ActionParams%d", index);
db_set_ts(0, MODULE, buff, i->szCommandParams);
}
@@ -493,8 +493,8 @@ void ShowPopup(ALARM *alarm)
POPUPDATAT ppd = { 0 };
ppd.lchIcon = hIconMenuSet;
- mir_tstrncpy(ppd.lptzContactName, data->szTitle, MAX_CONTACTNAME);
- mir_tstrncpy(ppd.lptzText, data->szDesc, MAX_SECONDLINE);
+ mir_wstrncpy(ppd.lptzContactName, data->szTitle, MAX_CONTACTNAME);
+ mir_wstrncpy(ppd.lptzText, data->szDesc, MAX_SECONDLINE);
ppd.PluginWindowProc = PopupAlarmDlgProc;
ppd.PluginData = data;
ppd.iSeconds = -1;
@@ -633,10 +633,10 @@ INT_PTR AddAlarmService(WPARAM, LPARAM lParam)
alarm.occurrence = alarm_info->occurrence;
alarm.snoozer = alarm_info->snoozer;
alarm.sound_num = alarm_info->sound_num;
- alarm.szCommand = mir_tstrdup(alarm_info->szCommand);
- alarm.szCommandParams = mir_tstrdup(alarm_info->szCommandParams);
- alarm.szDesc = mir_tstrdup(alarm_info->szDesc);
- alarm.szTitle = mir_tstrdup(alarm_info->szTitle);
+ alarm.szCommand = mir_wstrdup(alarm_info->szCommand);
+ alarm.szCommandParams = mir_wstrdup(alarm_info->szCommandParams);
+ alarm.szDesc = mir_wstrdup(alarm_info->szDesc);
+ alarm.szTitle = mir_wstrdup(alarm_info->szTitle);
alarm.time = alarm_info->time;
append_to_list(&alarm);
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index e5b80405c2..71c2606ec0 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -73,8 +73,8 @@ void ShowPopup(MCONTACT hContact, const wchar_t *msg)
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIconList1;
- mir_tstrncpy(ppd.lptzContactName, lpzContactName,MAX_CONTACTNAME);
- mir_tstrncpy(ppd.lptzText, msg, MAX_SECONDLINE);
+ mir_wstrncpy(ppd.lptzContactName, lpzContactName,MAX_CONTACTNAME);
+ mir_wstrncpy(ppd.lptzText, msg, MAX_SECONDLINE);
ppd.colorBack = GetSysColor(COLOR_BTNFACE);
ppd.colorText = RGB(0,0,0);
ppd.PluginWindowProc = PopupDlgProc;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 15f0fd185f..7ad231858c 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -136,34 +136,34 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
HICON hIcon = (min <= 5 ? hIconList2 : hIconList1);
DrawIconEx(dis->hDC,dis->rcItem.left,(dis->rcItem.top + dis->rcItem.bottom - 16)>>1,hIcon,0, 0, 0, NULL, DI_NORMAL);
- GetTextExtentPoint32(dis->hDC,alarm.szTitle,(int)mir_tstrlen(alarm.szTitle),&textSize);
+ GetTextExtentPoint32(dis->hDC,alarm.szTitle,(int)mir_wstrlen(alarm.szTitle),&textSize);
wchar_t buff[100];
if (min >= 60)
- mir_sntprintf(buff, TranslateT("%dh %dm"), min / 60, min % 60);
+ mir_snwprintf(buff, TranslateT("%dh %dm"), min / 60, min % 60);
else
- mir_sntprintf(buff, TranslateT("%dm"), min);
+ mir_snwprintf(buff, TranslateT("%dm"), min);
- GetTextExtentPoint32(dis->hDC,buff,(int)mir_tstrlen(buff),&timeSize);
+ GetTextExtentPoint32(dis->hDC,buff,(int)mir_wstrlen(buff),&timeSize);
if (textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
// need elipsis
wchar_t titlebuff[512];
- size_t len = mir_tstrlen(alarm.szTitle);
+ size_t len = mir_wstrlen(alarm.szTitle);
if (len > 511) len = 511;
while(len > 0 && textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
len--;
wcsncpy(titlebuff, alarm.szTitle, len);
titlebuff[len] = 0;
- mir_tstrcat(titlebuff, L"...");
- GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_tstrlen(titlebuff),&textSize);
+ mir_wstrcat(titlebuff, L"...");
+ GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_wstrlen(titlebuff),&textSize);
}
- TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,(int)mir_tstrlen(titlebuff));
- TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_tstrlen(buff));
+ TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,(int)mir_wstrlen(titlebuff));
+ TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_wstrlen(buff));
}
else {
- TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,(int)mir_tstrlen(alarm.szTitle));
- TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_tstrlen(buff));
+ TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,(int)mir_wstrlen(alarm.szTitle));
+ TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_wstrlen(buff));
}
SetBkMode(dis->hDC, OPAQUE);
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index d92f7a6685..1920adb518 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -417,10 +417,10 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDOK:
{
GetDlgItemText(hwndDlg, IDC_TITLE, buff, _countof(buff));
- replaceStrT(add_edit_alarm->szTitle, buff);
+ replaceStrW(add_edit_alarm->szTitle, buff);
GetDlgItemText(hwndDlg, IDC_DESC, buff, _countof(buff));
- replaceStrT(add_edit_alarm->szDesc, buff);
+ replaceStrW(add_edit_alarm->szDesc, buff);
if (add_edit_alarm->szTitle == 0 || add_edit_alarm->szTitle[0] == '\0') {
MessageBox(hwndDlg, TranslateT("Please enter a title for this alarm."), TranslateT("Error"), MB_OK | MB_ICONERROR);
@@ -447,9 +447,9 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (add_edit_alarm->action & AAF_COMMAND) {
GetDlgItemText(hwndDlg, IDC_ED_COMMAND, buff, _countof(buff));
- replaceStrT(add_edit_alarm->szCommand, buff);
+ replaceStrW(add_edit_alarm->szCommand, buff);
GetDlgItemText(hwndDlg, IDC_ED_PARAMS, buff, _countof(buff));
- replaceStrT(add_edit_alarm->szCommandParams, buff);
+ replaceStrW(add_edit_alarm->szCommandParams, buff);
}
if (add_edit_alarm->action & AAF_SOUND) {