diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-31 10:37:03 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-31 10:37:03 +0000 |
commit | cad77e7d51aef2c4d938fca592921e14d923f8c5 (patch) | |
tree | 84ad3fc6acc8fd0d58d843a1c99002f7f2dedf00 /plugins/NewXstatusNotify/src/options.cpp | |
parent | 5de1b2c939a26695aaab99540fe3d37527512cb3 (diff) |
minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11691 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify/src/options.cpp')
-rw-r--r-- | plugins/NewXstatusNotify/src/options.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 7ef2e24e81..811fe50d2a 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -381,32 +381,33 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
TCHAR str[MAX_SECONDLINE] = { 0 };
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++) {
- _tcsncpy(str, _T(""), MAX_SECONDLINE);
+ _tcsncpy(str, _T(""), SIZEOF(str));
if (opt.ShowStatus) {
if (opt.UseAlternativeText == 1)
- _tcsncpy(str, StatusList[Index(i)].lpzUStatusText, MAX_SECONDLINE);
+ _tcsncpy(str, StatusList[Index(i)].lpzUStatusText, SIZEOF(str));
else
- _tcsncpy(str, StatusList[Index(i)].lpzStandardText, MAX_SECONDLINE);
+ _tcsncpy(str, StatusList[Index(i)].lpzStandardText, SIZEOF(str));
if (opt.ShowPreviousStatus) {
TCHAR buff[MAX_STATUSTEXT];
mir_sntprintf(buff, SIZEOF(buff), TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(i)].lpzStandardText);
- mir_sntprintf(str, SIZEOF(str), _T("%s %s"), str, buff);
+ mir_tstrcat(str, _T(" "));
+ mir_tstrcat(str, buff);
}
}
if (opt.ReadAwayMsg) {
if (str[0])
- _tcscat(str, _T("\n"));
- _tcsncat(str, TranslateT("This is status message"), MAX_SECONDLINE);
+ mir_tstrcat(str, _T("\n"));
+ mir_tstrcat(str, TranslateT("This is status message"));
}
ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, i), i, str);
}
- _tcsncpy(str, TranslateT("This is extra status"), MAX_SECONDLINE);
+ _tcsncpy(str, TranslateT("This is extra status"), SIZEOF(str));
ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_EXTRASTATUS, str);
- _tcsncpy(str, TranslateT("This is status message"), MAX_SECONDLINE);
+ _tcsncpy(str, TranslateT("This is status message"), SIZEOF(str));
ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_STATUSMSG, str);
return FALSE;
|