diff options
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_cachefuncs.cpp | 11 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index e9ae405c35..dd8ecdaa3d 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -310,19 +310,16 @@ int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus }
// Get Status name
- {
- TCHAR *tmp = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)nStatus, GSMDF_TCHAR);
- lstrcpyn(text, tmp, text_size);
- //CopySkipUnprintableChars(text, dbv.pszVal, text_size-1);
- if (text[0] != '\0')
- return 1;
+ TCHAR *tmp = pcli->pfnGetStatusModeDescription(nStatus, 0);
+ if (tmp && *tmp) {
+ _tcsncpy_s(text, text_size, tmp, _TRUNCATE);
+ return 1;
}
// Get XStatusName
if ( !noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->m_cache_cszProto) {
DBVARIANT dbv = {0};
if ( !db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "XStatusName", &dbv)) {
- //lstrcpyn(text, dbv.pszVal, text_size);
CopySkipUnprintableChars(text, dbv.ptszVal, text_size-1);
db_free(&dbv);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 433c219aa9..f2f8a77b0c 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -268,7 +268,7 @@ static int FillDialog(HWND hwnd) {
LVITEM item = {0};
item.mask = LVIF_TEXT;
- item.pszText = (TCHAR *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)i, GSMDF_TCHAR);
+ item.pszText = pcli->pfnGetStatusModeDescription(i, 0);
item.iItem = i - ID_STATUS_OFFLINE;
newItem = SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
}
|